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