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

f = []

for i in range(1,n):
    for j in range(1,n):
        if not i == j:
            if a[0] ^ a[j] == a[i]:
                b = [-1] * n
                b[0] = a[0]
                b[1] = a[i]
                b[2] = a[j]
                f.append(b)

for i in range(3,n):
    for j in range(len(f)):
        s = set(a)
        for k in range(i):
            s.discard(f[j][k])
        s = list(s)

        count = 0
        for k in range(n-i):
            if f[j][i-2] ^ s[k] == f[j][i-1]:
                if count <= 0:
                    f[j][i] = s[k]
                    count += 1
                else:
                    b = f[j]
                    b[i] = s[k]
                    f.append(b)

ans_flag = False
for i in range(len(f)):
    if f[i][n-2] ^ f[i][0] == f[i][n-1]:
        ans_flag = True
        break

if ans_flag:
    print('Yes')
else:
    print('No')
