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

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

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