n = int(input()) a = list(map(int,input().split())) g = 0 for i in range(n): g ^= a[i] if g != 0: print("No") exit() b = [] for i in range(n): for j in b: a[i] = min(a[i], a[i]^j) if a[i] > 0: b.append(a[i]) if len(b) < n-1: print("Yes") else: print("No")