A,B = list(map(int, input().split())) while A>0 and B>0: if A>B: if A%2==0: A//=2 B-=1 else: if B%2!=0: print("No") exit() else: B//=2 A-=1 else: if B%2==0: B//=2 A-=1 else: if A%2!=0: print("No") exit() else: A//=2 B-=1 if A==0 or B==0: print("Yes")