import itertools

N = int(input())
a = list(int(i) for i in input().split())

for p in itertools.permutations(a, N):
    for i in range(N):
        if i ==0:
            if p[N-1]^p[i+1] != p[i]:
                break
        elif i == N-1:
            if p[i-1]^p[0] != p[i]:
                break
            else:
                print("Yes")
                exit()
        else:
            if p[i-1]^p[i+1] != p[i]:
                break
print("No")