from copy import copy
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
d = Counter(a)

#print(d)
for i in range(1, n):
    one = prev = a[0]
    two = cur = a[i]
    dd = copy(d)
    end = True
    for j in range(n-2):
        nxt = prev^cur
        if dd[nxt] >0:
            dd[nxt] -= 1
        else:
            end = False
            break
        prev = cur
        cur = nxt
    if end and prev^cur == one and dd[one] > 0 and cur^one == two and dd[two] > 0:
        print("Yes")
        exit()
print("No")