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

judge=False
#print(A)

for i in range(1,N):
    left = A[0]
    right = A[i]
    tmp_1=A[:]
    #print(tmp_1)
    tmp_1.remove(right)
    tmp_1.remove(left)
    tmp_2=[]
    isAble=True
    while isAble:
        #print(tmp_1)
        #print(tmp_2)
        x = right ^ left
        #print(x)
        if x in tmp_1:
            #print(x)
            left = right
            right = x
            tmp_1.remove(x)
            tmp_2.append(x)
        else:
            isAble=False

    if len(tmp_1)==0:
        judge=True
        break
    else:
        continue


ans = 'Yes' if judge else 'No'
print(ans)
