import copy
N = int(input())
a = [int(x) for x in input().split()]
removelist = [0]*N
for i in range(N):
    for k in range(i):
        A = copy.deepcopy(a)
        removelist[0] = A.pop(i)
        removelist[1] = A.pop(k)
        for j in range(2, N):
            if (removelist[j - 1] ^ removelist[j - 2]) in A:
                removelist[j] = removelist[j - 1] ^ removelist[j - 2]
                A.remove(removelist[j - 1] ^ removelist[j - 2])
            else:
                print("No")
                exit()
if removelist[N - 1] ^ removelist[1] != removelist[0]:
    print("No")
    exit()
else:
    print("Yes")