import itertools
N = int(input())
a = list(map(int, input().split()))

zikken1 = list(itertools.combinations(a,2))
counter = 0
for z1 in zikken1:
    z1 = list(z1)
    for i in range(N-2):
        z1.append(z1[i]^z1[i+1])
    if sorted(z1) == sorted(a):
        counter = 1

if counter == 1:
    print("Yes")
else:
    print("No")    