#yuki1224 import math a,b=map(int,input().split()) b//=int(math.gcd(a,b)) if 10**10000%b==0: print('No') else: print('Yes')