A, B = input().split() A = int(A.replace('.', '')) B = int(B.replace('.', '')) for i in range(2, 10 ** 5): e = 0 while A % i == 0: A //= i e += 1 if i % 2 == 0 or i % 5 == 0: e -= 4 if e * B >= 0 and e * B % 10000 > 0: exit(print("No")) print("Yes")