x,y=map(int, input().split()) a=10 for i in range(20): if a%y==0: print('Yes') exit() else: a*=10 print('No')