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(1, n)]))

check = True
for j in reversed(range(n-1)):
    combs = list(itertools.permutations([i for i in range(j, n)]))
    tmp = [i for i in range(0, j)]
    for comb in combs:
        tmp.extend(comb)
        for i in range(len(tmp)):
            idx = i
            if check:
                pre = idx - 1
                if pre < 0:
                    pre = n - 1
                
                if a[tmp[idx]] == a[tmp[pre]]^a[tmp[(idx + 1)%n]]:
                    check = False
            else:
                break
    
        if not check:
            break
            
    if not check:
        break
    
if not check:
    print("Yes")
else:
    print("No")