import numpy as np

import itertools

N = int(input())

a = np.array(list(map(int, input().split())))

zikken1 = list(itertools.combinations(a,2))
for i3, aa in enumerate(zikken1):
    zikken1[i3] = list(aa)
counter = 0
for z1 in zikken1:
    for i in range(N-2):
        z1.append(z1[i]^z1[i+1])
    if sorted(z1) == np.sort(a).tolist():
        counter = 1
if counter == 1:
    print("Yes")
else:
    print("No")    