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

perm = [0]
success = 0

def circle_xor(n, m = 1):
    global success
    if n == m:
        for i in range(0,2):
            back = perm[i-2]
            middle = perm[i-1]
            front = perm[i]
            if a[back] ^ a[front] == a[middle]:
                if i == 1:
                    success = 1
                continue
            else:
                break
    else:
        for i in range(1, n):
            if i in perm:
                continue
            perm.append(i)
            if m > 2 and n != 3:
                back = perm[i-2]
                middle = perm[i-1]
                front = perm[i]
                if a[back] ^ a[front] == a[middle]:
                    circle_xor(n, m + 1)
                else:
                    continue
            elif n == 3:
                circle_xor(n, m + 1)
            perm.pop()

circle_xor(n)

if success == 1:
    print('Yes')
else:
    print('No')