from math import gcd def check(): a, b = map(int, input().split()) g = gcd(a,b) c = b//g while c%2==0: c //= 2 while c%5==0: c //= 5 if c==1: return 'No' return 'Yes' print(check())