A,B = map(int,input().split()) while A > 0 or B > 0: if A&1 and B&1: break elif A&1: A -= 1 B >>= 1 elif B&1: A >>= 1 B -= 1 else: A >>= 1 B >>= 1 if A == 0 and B == 0: print('Yes') else: print('No')