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