def acinput():
    return list(map(int,input().split(" ")))


N=int(input())
a=sorted(acinput())
a.extend(a[:2])
res="Yes"
for i in range(N):
    if a[i]!=a[i+1]^a[i+2]:
        res="No"
        break

print(res)
