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

flag = False
import itertools
init = A[0]
A.remove(A[0])

def calc(x_old, x_now, y_old, y_now, A_now):
    for x_next, y_next in itertools.permutations(A_now,2):
        if x_now==x_old^x_next and y_now==y_old^y_next:
            A_next = A_now.copy()
            A_next.remove(x_next)
            A_next.remove(y_next)
            if len(A_next)<=2:
                return x_now, x_next, y_now, y_next, A_next
            else:
                calc(x_now, x_next, y_now, y_next, A_next)
    return 0, 0, 0, 0, []

for x0, y0 in itertools.combinations(A,2):
    if flag:
        break
    B = A.copy()
    if init==x0^y0:
        B.remove(x0)
        B.remove(y0)
        if len(B)==0:
            flag = True
            break
        elif len(B)==1:
            if x0==init^B[0] and B[0]==x0^y0 and y0==init^B[0]:
                flag = True
                break
        elif len(B)==2:
            for x1, y1 in itertools.permutations(B,2):
                if x0==init^x1 and y0==init^y1:
                    if x1==x0^y1 and y1==y0^x1:
                        flag = True
                        break
                        
        elif len(B)%2==1:
            x0, x1, y0, y1, C = calc(init, x0, init, y0, B)
            if x0==0 and x1==0 and y0==0 and y1==0 and C==[]:
                break
            elif x1==x0^C[0] and y1==C[0]^y0:
                if C[0]==x1^y1:
                    flag = True
                    break         
        elif len(B)%2==0:
            x0, x1, y0, y1, C = calc(init, x0, init, y0, B)
            if x0==0 and x1==0 and y0==0 and y1==0 and C==[]:
                break
            else:
                for x2, y2 in itertools.permutations(C,2):
                    if x1==x0^x2 and y1==y0^y2:
                        if x2==x1^y2 and y2==y1^x2:
                            flag = True
                            break

if flag:
    print("Yes")
else:
    print("No")