n=int(input())
a=list(map(int,input().split()))
l=[]
l.append(a[0])
def xx(n,a,l):
    for i in range(1,n):
        if a[i]^a[0] in a:
            x=a[i]^a[0]
            l.append(a[i])
            l.append(x)
            a.remove(a[i])
            a.remove(x)
            break
    if n==3:
        if len(l)==3:
            return "Yes"
        else:
            return "No"
    else:
        if len(l)!=3:
            return "No"
            exit()
        for i in range(3,n):
            if l[i-2]^l[i-1] in a:
                x=l[i-2]^l[i-1]
                l.append(x)
                a.remove(x)
            else:
                return "No"
                exit()
        if len(l)==n and l[0]^l[1]==l[-1]:
            return "Yes"
        else:
            return "No"

print(xx(n,a,l))
