import itertools
from unittest.mock import patch

def saiki(a,B):
    if len(B) > 0:
        for i in B:
            if a[2] == a[1] ^ i:
                a[1] = a[2]
                a[2] = i
                B.remove(i)
                saiki(a,B)

def check():
    N = int(input())
    A = [int(i) for i in input().split()]

    for a in itertools.permutations(A, 3):
        B = set(A)
        if a[1] == a[0] ^ a[2]:
            for i in a:
                B.remove(i)
            saiki(a,B)
            if len(B) == 0:
                if a[2] == a[1] ^ a[0]:
                    return "Yes"
    return "No"
print(check())