n, x = map(int, input().split()) a = list(map(int, input().split())) # Custom sort based on the minimum of a and a^x a.sort(key=lambda val: min(val, val ^ x)) possible = True for i in range(n-1): ai = a[i] ai1 = a[i+1] cond1 = ai < (ai1 ^ x) cond2 = (ai ^ x) < ai1 if not (cond1 and cond2): possible = False break print("Yes" if possible else "No")