N = int(input()) A = list(map(int, input().split())) if len(set(A)) < N or (0 in A): print("Yes") else: memo = set() b = 0 ans = "No" for i in range(N): ai = A[i] b ^= ai memo = set([ai ^ m for m in memo]) memo.add(ai) if 0 in memo and i != N-1: ans = "Yes" if b != 0: print("No") else: print(ans)