N, K = map(int, input().split())
A = list(map(int, input().split()))

b = [A[0]]
for i in range(1, N):
    b.append(b[-1]^A[i])

s = set()
for i in range(N):
    if b[i] == K:
        print("Yes")
        break
    if K^b[i] in s:
        print("Yes")
        break
    s.add(b[i])

else:
    print("No")