import itertools

def Check(a, b, c):
    if a^b == c:
        return 1
    else:
        return -1

n = int(input())
cap = list(map(int, input().split()))

a = list(itertools.permutations(cap))

for i in range(len(a)):
    for j in range(n):
        v = Check(a[i][j], a[i][(j+1)%n], a[i][(j+2)%n])
        if v == -1:
            break
        elif j == n-1:
            print("Yes")
            exit()

print("No")
