import itertools
import sys

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

for i in itertools.permutations(a, len(a)):
    i_add = i + (i[0], i[1])
    for j in range(0, len(i)):
        if i_add[j] ^ i_add[j+2] != i_add[j+1]:
            flag = True
        if flag:
            break
        print("Yes")
        sys.exit()

print("No")
