N = int(input())
A = list(map(int, input().split()))

hats = A[:]
import copy
from collections import defaultdict
d = defaultdict(lambda: 0)

for h in hats:
    d[h] += 1

h1 = hats[0]
 
def search(now1, now2, count, d):
    try: 
        now1, now2 = now2, now1^now2
        if d[now2] > 0:
            if count == N:
                return True
            else:
                d[now1] -= 1
                return search(now1, now2, count+1, d)
        else:
            return False
    except:
        return False
    

ans = False
for h2 in hats[1:N//2+1]:
    if search(h1, h2, 2, copy.copy(d)):
        ans = True

if ans:
    print('Yes')
else:
    print('No')