ClosestPair working perfectly in O(n log n) time!