n = int(input().strip())
hat =  list(map(int,input().split()))

# listの1番目をx0として選ぶ
camel_order = []
camel_order.append([hat[0]])

#hatからx0を消す
hat = hat[1:n]
hat_size = n
# 
for x in camel_order:
    if len(hat) == hat_size:
        break
    else:
        hat_size = len(hat)
    
    if len(camel_order) == n:
        break
    if len(x) == 1:
        for h1 in hat:
            for h2 in hat:
                if h1 ^ h2 == x[0]:
                    camel_order.append([x[0], h1])
                    camel_order.append([x[0], h2])
                    hat.remove(h1)
                    hat.remove(h2)
                    break
    else:
        for h1 in hat:
            if x[1] ^ h1 == x[0]:
                camel_order.append([x[1], h1])
                hat.remove(h1)
                
if len(camel_order) == n:
    print('Yes')
else:
    print('No')