## https://yukicoder.me/problems/no/2672 def main(): N = int(input()) A = list(map(int, input().split())) if N <= 16: for bit in range(1, 2 ** N - 1): ans = 0 for i in range(N): if bit & (1 << i) > 0: ans ^= A[i] if ans == 0: print("Yes") return print("No") else: a_set = set() for a in A: if a not in a_set: b_array = [] for b in a_set: b_array.append(a ^ b) for b in b_array: a_set.add(b) a_set.add(a) print(a_set) else: print("Yes") return print("No") if __name__ == "__main__": main()