N = int(input()) A = list(map(int, input().split())) S = 0 for a in A: S ^= a if S != 0: print("No") exit() if N >= 5002: print("Yes") exit() inf = 10000000 Z = 8191 dp = [inf] * (Z+1) dp[A[0]] = 1 for idx in range(1, N): a = A[idx] pre = [inf] * (Z+1) dp, pre = pre, dp for i in range(Z+1): dp[i] = min(dp[i], pre[i]) ni = i ^ a dp[ni] = min(dp[ni], pre[i] + 1) if dp[0] < N: print("Yes") else: print("No")