A,B=map(int,input().split()) A=("0"*32+bin(A)[2:])[-32:] B=("0"*32+bin(B)[2:])[-32:] for i in range(len(A)-1,-1,-1): if A[i]=="1" and B[i]!="1": print("No");exit() print("Yes")