from collections import deque def can_reach(A, B): visited = set() queue = deque() queue.append((A, B)) visited.add((A, B)) while queue: x, y = queue.popleft() if x == 0 and y == 0: return True # Try reverse operation 1 if x % 2 == 0 and y >= 1: new_x = x // 2 new_y = y - 1 if new_x >= 0 and new_y >= 0 and (new_x, new_y) not in visited: visited.add((new_x, new_y)) queue.append((new_x, new_y)) if new_x == 0 and new_y == 0: return True # Try reverse operation 2 if y % 2 == 0 and x >= 1: new_x = x - 1 new_y = y // 2 if new_x >= 0 and new_y >= 0 and (new_x, new_y) not in visited: visited.add((new_x, new_y)) queue.append((new_x, new_y)) if new_x == 0 and new_y == 0: return True # If both are even, try both possibilities if x % 2 == 0 and y % 2 == 0: new_x1 = x // 2 new_y1 = y - 1 if new_x1 >= 0 and new_y1 >= 0 and (new_x1, new_y1) not in visited: visited.add((new_x1, new_y1)) queue.append((new_x1, new_y1)) if new_x1 == 0 and new_y1 == 0: return True new_x2 = x - 1 new_y2 = y // 2 if new_x2 >= 0 and new_y2 >= 0 and (new_x2, new_y2) not in visited: visited.add((new_x2, new_y2)) queue.append((new_x2, new_y2)) if new_x2 == 0 and new_y2 == 0: return True return False # Read input A, B = map(int, input().split()) if can_reach(A, B): print("Yes") else: print("No")