N, K = map(int, input().split())
g = gcd(N, K)
if divisible_2_5(K // g):
    print('YES')
else:
    print('NO')