import collections

N = input()
N = int(N)
a = [ int(i) for i in input().split()]
c = collections.Counter(a)
hoge = False

def check(i,j):
    c[j] -= 1
    for k in range(len(a)-1):
        if c[i^j] == 0:
            return False
        c[i^j]-=1
        i2 = j
        j = i^j
        i = i2
    return True

for  i in range(len(a)-1):
    for j in range(i+1,len(a)):
        if check(a[i],a[j]):
            hoge = False
            break
        else:
            break
    else:
        continue
    break

if hoge:
  print("Yes")
else:
  print("No")