n,x = map(int,input().split()) A = list(map(int,input().split())) sA = sorted([[min(a,a^x),a] for a in A]) for i in range(n-1): a = sA[i][1] na = sA[i+1][1] if a < na^x and a^x < na: continue print("No") exit() print("Yes")