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