n,m = map(int,input().split()) ok=1 for i in range(100000): if (n>>i & 1): if not (m>>i & 1): ok=0 if ok: print('Yes') else: print('No')