// Arup Guha
// Originally written on: 3/31/2022
// Was a TLE submission for the Kattis problem Closest Pair of Points (closestpair).
// Written in class.

/***
	Modified on 8/27/2026, adapted to solve the Sphere online judge problem: CLOPPAIR
	https://www.spoj.com/problems/CLOPPAIR/
	
	This new problem does the following differently:
	1. One test case per input (not processing multiple cases)
	2. Output isn't points. Output is INDEX of points into original list and distance.
	
	This code passes on the SPOJ website with a time of 4.61. It's unclear to me if this is
	per test case or the sum of run times of all of the cases. Probably the former...
***/

import java.util.*;
import java.io.*;

public class closestpair {

	public static void main(String[] args) throws Exception {
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(stdin.readLine().trim());
	
		// Create my list of points.
		ArrayList<pt> list = new ArrayList<pt>();
		for (int i=0; i<n; i++) {
			StringTokenizer tok = new StringTokenizer(stdin.readLine());
			double x = Double.parseDouble(tok.nextToken());
			double y = Double.parseDouble(tok.nextToken());
			list.add(new pt(x, y, i));
		}
			
		// Solve and output.
		pt[] ans = getClosestPair(list);
		int minIdx = Math.min(ans[0].ID, ans[1].ID);
		int maxIdx = Math.max(ans[0].ID, ans[1].ID);
		System.out.printf("%d %d %.6f\n", minIdx, maxIdx, ans[0].getRealDist(ans[1]));
	
	}
	
	// Just run n^2 here.
	public static pt[] bruteForce(ArrayList<pt> list) {
		
		// Set answer to the distance between the first two points.
		long distSq = list.get(0).distSq(list.get(1));
		pt[] res = new pt[2];
		res[0] = list.get(0);
		res[1] = list.get(1);
		
		// Just try all the pairs.
		for (int i=0; i<list.size(); i++) {
			for (int j=i+1; j<list.size(); j++) {
				if (list.get(i).distSq(list.get(j)) < distSq) {
					distSq = list.get(i).distSq(list.get(j));
					res[0] = list.get(i);
					res[1] = list.get(j);
				}
			}
		}
		
		// Here is the best one.
		return res;
		
	}
	
	// Returns the closest pair of points of all the points in list.
	public static pt[] getClosestPair(ArrayList<pt> list) {
		
		int n = list.size();
		
		// To avoid recursive overhead.
		if (n < 25)
			return bruteForce(list);
		
		// Sort pts by x.
		Collections.sort(list);
		
		// Copy first half into left.
		ArrayList<pt> left = new ArrayList<pt>();
		for (int i=0; i<n/2; i++)
			left.add(list.get(i));
		
		// Copy second half into right.
		ArrayList<pt> right = new ArrayList<pt>();
		for (int i=n/2; i<n; i++)
			right.add(list.get(i));	
		
		// My dividing point.
		long div = (list.get(n/2-1).x + list.get(n/2).x)/2;

		// Recursively solve problem on left and right.
		pt[] bestLeft = getClosestPair(left);
		pt[] bestRight = getClosestPair(right);
		
		// Get these distances.
		long leftD = bestLeft[0].distSq(bestLeft[1]);
		long rightD = bestRight[0].distSq(bestRight[1]);
		
		// Stores my current answer.
		pt[] res = leftD < rightD ? bestLeft : bestRight;
		
		// Getting the boundaries of my strip.
		long deltaSq = Math.min(leftD, rightD);
		double delta = Math.sqrt(deltaSq);
		long lowLimit = div - (long)(delta+1);
		long highLimit = div + (long)(delta+1);
		
		// Put in all the pts close enough to the boundary.
		ArrayList<pt> strip = new ArrayList<pt>();
		for (int i=0; i<n; i++)
			if (list.get(i).x >= lowLimit && list.get(i).x <= highLimit)
				strip.add(list.get(i));
		
		// Sort by y.
		Collections.sort(strip, (pt a, pt b) -> Long.compare(a.y, b.y));
		
		// Brute Force on strip.
		for (int i=0; i<strip.size(); i++) {
			for (int j=i+1; j<Math.min(i+8, strip.size()); j++) {
				if (strip.get(i).distSq(strip.get(j)) < deltaSq) {
					res[0] = strip.get(i);
					res[1] = strip.get(j);
					deltaSq = strip.get(i).distSq(strip.get(j));
				}
			}
		}
		
		// Ta da!
		return res;
	}
}

class pt implements Comparable<pt> {
	
	public long x;
	public long y;
	public int ID;
	
	// Creates a point that is 100 times (myx, myy).
	public pt(double myx, double myy, int index) {
		x = myx >= 0 ? (long)(myx*100 + 1e-6) : (long)(myx*100 - 1e-6);
		y = myy >= 0 ? (long)(myy*100+1e-6) : (long)(myy*100-1e-6);
		ID = index;
	}
	
	// For their output.
	public void print() {
		System.out.printf("%.2f %.2f", x/100.0, y/100.0);
	}
	
	// Sort by x, sort by y.
	public int compareTo(pt other) {
		if (x < other.x) return -1;
		if (x > other.x) return 1;
		if (y < other.y) return -1;
		return 1;
	}
	
	// Returns the distance squared between this and other.
	public long distSq(pt other) {
		return (x-other.x)*(x-other.x) + (y-other.y)*(y-other.y);
	}
	
	// For SPOJ problem specification.
	public double getRealDist(pt other) {
		return Math.sqrt(distSq(other))/100.0;
	}
}