program amicable_pairs; p := propDivSums(20000); loop for [n,m] in p | n = p(p(n)) and n