Problems
Circle of choirs
Circle of choirs
There is a section of choral singing at school. The start of the section always happens in the same way: by the signal of the leader all n participants stand in a circle and each m-th person sings a scale for chanting.
The leader of the section noticed that all the members are not always able to stretch their vocal cords. Given n and m, help him to determine whether or not all the choir participants will take part in the warm-up again.
Input
Consists of several cases. Each case contains two positive integers n and m (1 ≤ n, m ≤ 103
).
Output
If everyone has a chance to sing, print "YES", otherwise "NO".
Input example #1
4 1 6 3
Output example #1
YES NO