n = int(input())
a = list(map(int, input().split()))

ans = [-1]*n

# first
ans[0] = a.pop(0)
is_next = False
for i in range(len(a)):
    for j in range(i+1, len(a)):
        if ans[0] == a[i]^a[j]:
            ans[1] = a.pop(i)
            ans[-1] = a.pop(j-1)
            is_next = True
if is_next == False:
    print("No")
    exit()

# 1 ~ last-2
for i in range(1, n-2):
    is_next = False
    for j in range(len(a)):
        if ans[i] == ans[i-1]^a[j]:
            ans[i+1] = a.pop(j)
            is_next = True
    if is_next == False:
        print("No")
        exit()

# last
if len(a) != 0:
    ans[-2] = a.pop(0)
if ans[-2] != ans[-3]^ans[-1] or ans[-1] != ans[-2]^ans[0]:
    print("No")
    exit()

print("Yes")