import sys
input=sys.stdin.readline

N = int(input())
a = list(map(int, input().split()))

a.sort()
h = {}
for i in a:
    if i in h:
        h[i] += 1
    else:
        h[i] = 1
k = []
v = []
for i,j in h.items():
    k.append(i)
    v.append(j)

if len(h) == 1:
    if k[0] == 0:
        print("Yes")
elif len(h) == 2:
    if k[0] == 0 and 2*v[0] == v[1]:
        print("Yes")
elif len(h) == 3:
    if k[0] ^ k[1] == k[2] and v[0] == v[1] and v[1] == v[2]:
        print("Yes")
print("No")
