from math import gcd a,b=map(int,input().split()) x=b//gcd(a,b) while x%2==0: x//=2 while x%5==0: x//=5 print("Yes" if x!=1 else "No")