a,b = map(int,input().split()) if a > b : a,b = b,a for c in range(a,b+1) : if c % a == 0 and b % c == 0 : print("YES") break else : print("NO")