n, x = map(int, input().split()) A = list(map(int, input().split())) A.sort(key=lambda a: min(a, a ^ x)) for i in range(n - 1): if A[i] >= A[i + 1] ^ x or A[i] ^ x >= A[i + 1]: print("No") exit() print("Yes")