n,x = map(int,input().split()) a = list(map(int,input().split())) if len(a) != len(set(a)): print("No") exit() #print(bin(x)[2:][::-1]) #print("AAAAA") cnt = 0 for num in a: if num^x <= x: cnt += 1 #print(bin(num)[2:][::-1]) print("Yes" if cnt <= 1 else "No")