import sys a, b = map(int, input().split()) for i in range(1, 201): if a % i == 0 and i % b == 0: print('YES') sys.exit() print('NO')