from operator import xor

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

D = {}

for n in A :
    if n not in D :
        D[n] = 1
    else :
        D[n] += 1

if N == 3 :
    if xor(A[0], A[1]) == A[2] :
        ans = "Yes"
    else :
        ans = "No"
else :
    if D.get(0,0) >= N-1 :
        ans = "Yes"
    else :
        ans = "No"
print(ans)

