# A - XOR Circle

N = int(input())
a = list(map(int,input().split()))
a.sort()

if a[N-1]==0 and a[N]==a[3*N-1]:
    ans = 'Yes'
elif a[0]==a[N-1] and a[N]==a[2*N-1] and a[2*N]==a[3*N-1] and x^y^z==0:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)