from heapq import * def solve(): N,X=map(int,input().split()) A=list(map(int,input().split())) B=[a^X for a in A] I=sorted(range(N),key=lambda i:A[i]+B[i]) for k in range(N-1): if A[I[k]]>=B[I[k+1]] or B[I[k]]>=A[I[k+1]]: return False return True print("Yes" if solve() else "No")