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)
        first = A.pop(i)
        f = 0
        f += first
        second = A.pop(k)
        s = 0
        s += second
        for j in range(2, N):
            if (f ^ s) in A:
                A.remove(f ^ s)
                f, s = s, f ^ s
            else:
                print("No")
                exit()
if s ^ second != first:
    print("No")
    exit()
else:
    print("Yes")
