n = int(input())
a_lists = list(input().split())

lists = []
index = [0] * n

cnt = 0

def search(a,b,c):

    if int(a_lists[a]) == int(a_lists[b]) ^ int((a_lists[c])):
        index[c] = 1
        index[a] = 1
        index[b] = 1

        return 1
    else:
        return -1

for i in range(0,int(n)):
    if index[i] == 1:
        next

    cnt = 0
    for j in range(0,int(n)):
        if index[j] == 1:
            next
        if i == j:
            next

        cnt_j = 0
        for k in range(0,int(n)):
            if index[k] == 1:
                next
            if i == k:
                next
            if j == k:
                next
            ret = search(i,j,k)
            if ret > 0:
                cnt_j = 1
                break
        if cnt_j == 1:
            cnt = 1
            break
    if cnt == 0:
        print("No")
        exit()

print("Yes")
