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:
  A.append(A[0])
  A.append(A[1])
  for i in range(N):
    d=A[i]^A[i+1]^A[i+2]
    if d!=0:
      print('No')
      exit()
  print('Yes')