n = int(input())
d = {}
for x in input().split():
    a = int(x)
    if a in d:
        d[a] += 1
    else:
        d[a] = 1
ans = "No"
if len(d) == 3 and len(set([d[key] for key in d]))== 1:
    a, b, c = d.keys()
    if a == b ^ c and b == a ^ c and c == b ^ a:
        ans = "Yes"
print(ans)
