Coprime or Not
Are A and B coprime (gcd = 1)?
Input: one line with two integers A and B.
Output: YES or NO.
Constraints:
- 1 ≤ A, B ≤ 1018
Sample Tests
Input 1
8 15
Output 1
YES
Input 2
12 18
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.