N = int(input())
l = {i: a for i, a in enumerate(map(int, input().split(' ')))}
k_l = [list(l.keys())[0]]

def find():
    for k, v in l.items():
        if k in set(k_l):
            continue
        if l[k_l[-2]] ^ l[k_l[-1]] == v:
            return k
    return None

for i in list(l.keys())[1:]:
    k_l.append(i)

    key = find()
    while key is not None:
        k_l.append(key)
        if len(k_l) == N:
            print('Yes')
            exit()

    k_l = [list(l.keys())[0]]

print('No')
