my ($x, $y) = find_best_partition(map int(rand(1000)), 1..100);