First version of closest pair. Do no check both extremities, so weird results