A, B = map(int, input().split()) if A == 0 and B == 0: print("Yes") else: while True: if A == 0 and B == 0: print("Yes") break # Try to reverse Op2 first (B even and A >=1) if B % 2 == 0 and A >= 1: A -= 1 B = B // 2 elif A % 2 == 0 and B >= 1: A = A // 2 B -= 1 else: print("No") break