import itertools

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

com_a = list(itertools.permutations(a))
cnt_xor=0

for i in range(len(com_a)):
    for j in range(-1,len(a)-1):
        if com_a[i][j] != (com_a[i][j+1]^com_a[i][j-1]):
            cnt_xor=0
            break
        cnt_xor+=1

    if cnt_xor != 0:
        print("Yes")
        break
    elif i == len(com_a)-1:
        print("No")
