n, x = map(int, input().split()) a = list(map(int, input().split())) b = [(min(a[i], a[i] ^ x), i) for i in range(n)] b.sort() a = [a[i[1]] for i in b] ok = True for i in range(1, n): ok &= a[i - 1] < (a[i] ^ x) ok &= (a[i - 1] ^ x) < a[i] print("Yes" if ok else "No")