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)]))
combs = [comb for comb in combs if comb[0] == 0]

check = True
for comb in combs:
    for idx in range(n):
        if check:
            pre = idx - 1
            if pre < 0:
                pre = n - 1
            
            if a[comb[idx]] != a[comb[pre]]^a[comb[(idx + 1)%n]]:
                check = False
        else:
            break

    if not check:
        break

if check:
    print("Yes")
else:
    print("No")