from bisect import bisect_left as bl
from copy import deepcopy as dc
N = int(input())
Al = sorted(list(map(int, input().split())))
#print(Al)
q = -1
r = -1
for i in range(1, N - 1):
  A = dc(Al)
  #print(A)
  p = A.pop(0)
  temp = p ^ A[i]
  index = bl(A, temp)
  if index >= N - 1:
    continue
  if temp == A[index]:
    r = A.pop(i)
    q = A.pop(index)
    
    for j in range(1, N - 2):
      temp = q ^ r
      index = bl(A, temp)
      if temp == A[index]:
        t = r + 0
        if i == N - 4:
          r = p
        else:
          r = A.pop(index)
        q = t
      else:
        q = -1
        r = -1
        break
        
    
if q == -1:
  print("No")
  exit(0)
else:
  print("Yes")