a,b=map(int,input().split()) m=a for i in range(10**6): m=(m*10)%b if m!=0: print("Yes") exit() if (m*10)%b==0: print("No") else: print("Yes")