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

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
            break
    if is_next:
        break
if is_next == False:
    print("No")
    exit()
if n == 3:
    print("Yes")
    exit()

def my_index(l, x, default=False):
    return l.index(x) if x in l else default

for i in range(2, n-2):
    index = my_index(a, ans[i-2]^ans[i-1])
    if index == False:
        print("No")
        exit()
    ans[i] = a.pop(index)

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

print("Yes")