A, B = map(int, input().split()) B0 = B while B <= A: if A % B == 0: print("YES") exit() B += B0 print("NO")