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+1)%N]:
        #print(a[i],a[i-1],a[i+1])
        #print(i)
        res="No"
        break

print(res)

