def main(): import sys import random from heapq import heappop, heappush input = sys.stdin.readline N, X = map(int, input().split()) A = list(map(int, input().split())) h = [] for i in range(N): heappush(h, (A[i], 0, i)) heappush(h, (A[i]^X, 1, i)) res1, res2 = [], [] for i in range(2*N): n, w, idx = heappop(h) l1, l2 = len(res1), len(res2) w1, w2 = (l1+1)%2, l2%2 if w1==w2: if w1!=w: exit(print('No')) else: if l1>l2: if res1[l2] == idx: res2.append(idx) else: res1.append(idx) else: if res2[l1] == idx: res1.append(idx) else: res2.append(idx) else: if w1 == w: res1.append(idx) else: res2.append(idx) if len(res1) != len(res2): exit(print("No")) else: for i in range(N): if res1[i] != res2[i]: exit(print("No")) print('Yes') if __name__=='__main__': main()