Redirecting to Closest pair of points problem