N=int(input())
A=list(map(int, input().split()))
A=sorted(A)
if N%3!=0:
  if A==[0]*N:
    print('Yes')
  else:
    print('No')
else:
  B=A[0]+A[1]
  for i in range(N):
    d=B[i]^B[i+1]^B[i+2]
    if d!=0:
      print('No')
      exit()
  print('Yes')