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(1, n): if A[i - 1] >= A[i] ^ x or A[i - 1] ^ x >= A[i]: print("No") exit() print("Yes")