import itertools
n = int(input())
a = list(map(int, input().split()))
ok = False
for v in itertools.permutations(a):
    v = v+v[:2]
    for i in range(n):
        if int(bin(v[i] ^ v[i+1] ^ v[i+2]), 2) != 0: break
        elif i == n-1 and int(bin(v[i] ^ v[i+1] ^ v[i+2]), 2) == 0: ok = True
    if ok: break
print("Yes" if ok else "No")