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(1, min(len(n), len(m))+1): if n[-i]=="1" and m[-i] == "0": print("No") valid = False break if valid: print("Yes")