#!python # -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10 ** 8) T = [] for i in range(60): T.append(2 ** i) def DFS(A, B): if A == 0 and B == 0: return True if A % 2 == 1 and B % 2 == 1: return False if A in T or B in T: return True if A % 2 == 1: return DFS(A - 1, B // 2) elif B % 2 == 1: return DFS(A // 2, B - 1) else: return DFS(A - 1, B // 2) or DFS(A // 2, B - 1) A, B = map(int, input().split()) print('Yes' if DFS(A, B) else 'No')