import numpy as np

N = int(input())
A = input().split(' ')

an = np.array(A, dtype=np.int64)

for i in range(1,N):
   for j in range(i+1,N):
      if(an[0] == an[i]^an[j]):
         tmp = an[1]
         an[1] = an[i]
         an[i] = tmp

         tmp = an[2]
         an[2] = an[j]
         an[j] = tmp

         doo = 1
         break
      else:
         doo = 0

if(doo == 0):
   print('No')
   break

for i in range(2,N):
   for j in range(i+1,N):
      if(an[i-1] == an[i]^an[j]):
         tmp = an[i+1]
         an[i+1] = an[j]
         an[j] = tmp
         doo=1
         break
      else:
         doo=0

   if(doo==0):
      print('No')
      break


if(an[0] == an[1]^an[N-1]):
   doo=1
else:
   doo=0

if(doo==1):
   print('Yes')
