import itertools


def checkXOR(Cap):
    num = len(Cap)

    for i in range(num):
        L = Cap[(i - 1) % num]
        Me = Cap[i]
        R = Cap[(i + 1) % num]

        if (L ^ R == Me):
            return True
        else:
            return False


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

for Cap in itertools.permutations(A):
    if (checkXOR(Cap) == True):
        print("Yes")
        exit(0)

print("No")
