import sys input = sys.stdin.readline N,X=map(int,input().split()) A=list(map(int,input().split())) from functools import cmp_to_key def cmp(a,b): return -1 if min(a,a^X)= As[i] or As[i-1] >= As[i]^X: ng=1 print("Yes" if ng==0 and len(set(A))==N else "No")