a, b = map(int, input().split()) if a == 0 or b == 0: print("Yes" if a + b == 0 else "Yes") else: while a % 2 == 0 and b % 2 == 0: a //= 2 b //= 2 while True: if a == 0 or b == 0: break if a % 2 == 0: a //= 2 b -= 1 elif b % 2 == 0: a -= 1 b //= 2 else: break while a % 2 == 0 and b % 2 == 0: a //= 2 b //= 2 print("Yes" if a == 0 or b == 0 else "No")