import sys

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


for i in range(1,N):

    b = [-1]*N
    c = a[:]

    b[0] = c[0]
    c[0] = -1

    b[1] = c[i]
    c[1] = -1

    for j in range(2,N):
        if b[j-2]^b[j-1] in c:
            n = c.index(b[j-2]^b[j-1])
            b[j] = c[n]
            c[n] = -1
        else:
            break

        if j == N-1:
            print("Yes")
            sys.exit()

print("No")