import itertools

n = int(input()) # The number of camel
a = [int(i) for i in input().split()] # Hat's number

combs = list(itertools.permutations([i for i in range(n)]))

check = True
for comb in combs:
    for i in range(len(comb)):
        if check and comb[i] == 0:
            idx = i
            pre = i - 1
            if pre < 0:
                pre = n - 1
            
            nex = idx + 1
            if n == nex:
                nex = 0

            if a[comb[idx]] != a[comb[pre]]^a[comb[nex]]:
                check = False
        else:
            break
    
    if not check:
        break

if check:
    print("yes")
else:
    print("no")