import sys input = sys.stdin.readline from collections import Counter N,K=map(int,input().split()) A=list(map(int,input().split())) X=[0] for a in A: X.append(X[-1]^a) Y=Counter(X[1:]) for y in Y: k=K^y if k==y: if Y[k]>=2: print("Yes") break else: if Y[k]>=1: print("Yes") break else: print("No")