n, m = map(int, input().split()) n, m = str(bin(n))[2:], str(bin(m))[2:] if len(n) > len(m): print("No") else: valid = True for i in range(len(m)): if n[i]=="1" and m[i] == "0": print("No") valid = False break if valid: print("Yes")