def b(x):return x if x%2 else b(x/2) def f(x):return x if x%5 else f(x/5) n,m=map(lambda x: b(f(int(x))),input().split()) s=str(n/m) print("Yes" if (len(s)>10 or s.find('e')>0) and n%m and m>1 else "No")