# -*- coding: utf-8 -*-

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

a = sorted(a)
flag = True
first = a.pop(0)
pp = first
p = a.pop(0)
for x in a:
    if x ^ pp != p:
        flag = False
        break
    pp = p
    p = x
if first ^ pp != p:
    flag = False

if flag:
    print("Yes")
else:
    print("No")