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

flag = [False]*N
res = []

def f():
    if len(res) == len(A):
        if res[-1]^res[-2] == res[0]:
            print("Yes")
            exit()
        return

    for i in range(len(A)):
        if flag[i]:
            continue
        if res[-1]^res[-2] != A[i]:
            continue
        flag[i] = True
        res.append(A[i])
        f()
        flag[i] = False
        res.pop()
        return

flag[0] = True
res.append(A[0])

for i in range(1, N):
    flag[i] = True
    res.append(A[i])
    f()
    flag[i] = False
    res.pop()

print("No")