A,B = map(int,input().split()) import sys q = [(A,B)] while len(q): a,b = q.pop() if a == 0 and b == 0: print('Yes') exit() if a & 1 == 0 and b > 0: q.append((a//2,b-1)) if a > 0 and b & 1 == 0: q.append(a-1,b // 2) print('No')