import math a,b=map(int,input().split()) b//=math.gcd(a,b) while b%5<1: b//=5 while b&1<1: b//=2 print(['No','Yes'][b>1])