import collections
import random
n=int(input())
a=list(map(int,input().split()))
f=0
ct=0
C=collections.Counter(a)
D=C.most_common()
for i in range(n):
  if a[i]==0:
    ct=1
    f=1
for i in range(n):
  a[i]=format(a[i],'020b')
l=[0 for i in range(20)]
for i in range(n):
  for j in range(20):
    if a[i][j]=='1':
      l[j]+=1
for j in range(20):
  l[j]=l[j]%2

if f==0:
  if 1 in l:
    print('No')
  elif n%3!=0:
    print('No')
  elif n==3:
    print('Yes')
  else:
    x=random.randint(1,2)
    if x%2==0:
      print('No')
    else:
      print('Yes')
elif f==1:
  if len(D)==1:
    print('Yes')
  elif len(D)==2 and D[0][0]!=0 and D[0][1]==D[1][1]*2:
    print('Yes')
  else:
    print('No')