def gcd(a,b): while b: a,b=b,a%b return a a,b=map(int,input().split()) b//=gcd(a,b) while not(b%2): b//=2 while not(b%5): b//=5 if b!=1: print("Yes") else: print("No")