a,b=map(int,input().split()) ans=str(a/b) print('Yes' if len(set(ans[2:]))==1 and a!=b else 'No')