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