N=int(input())
a=sorted(list(map(int, input().split())))
A=0
for i in range(N):
  Be=a[len(a)-1] if i==0 else a[i-1]
  Af=a[0] if i==len(a)-1 else a[i+1]
  if Be^Af!=a[i]:
    print('No');exit()

print('No')