closest pair problem for 1d/2d