def func(n): if n%2!=0 and n%5!=0:return True while n%2==0 or n%5==0: if n%2==0:n//=2 if n%5==0:n//=5 for i in range(3,int(n**0.5),2): if n%i==0:return True return False a,b=map(int,input().split()) print('Yes' if func(b) else 'No')