N, X = map(int, input().split()) A = list(map(int, input().split())) D = [] for a in A: D.append((min(a, a^X), a)) D.sort() def f(a, b, x): return a < b^x and a^x < b ans = 1 for i in range(N - 1): ans &= f(D[i][1], D[i + 1][1], X) print("Yes") if ans else print("No")