n = int(input())
l = list(map(int, input().split()))
print(n)
print(l)
if n % 3 != 0:
    print("No")
    quit()
lc = [0] * (10**5+1)
for i in l:
    lc[i] += 1
cs = [(i, n) for i, n in enumerate(lc) if n]
print(cs)
if len(cs) != 3:
    print("No")
    quit()
a = l[0]
for i in range(1, n):
    b = l[i]
    c = a ^ b
    print(a, b, c)
    if (
            lc[a] == n / 3 and
            lc[b] == n / 3 and
            lc[c] == n / 3
            ):
        print("Yes")
        quit()
print("No")
