#include <bits/stdc++.h>
using namespace std;
int u;
int v;
long long int bestmin = 10000000000000;
long long int minimum = 10000000000000;
struct points
{
long long int x;
long long int y;
int pos;
};
int xcompare(points a, points b)
{
return(a.x < b.x);
}
int ycompare(points a, points b)
{
return (a.y < b.y);
}
long long int dis(points a,points b)
{
return (((a.x - b .x) * (a.x - b.x)) + ((a.y - b.y) * (a.y - b.y)));
}
long long int brute(points a[],int s,int e)
{
int i;
int j;
int n;
int c;
int d;
int l;
int r;
n = e - s + 1;
for(i = s; i <= e ; i++) {
for(j = i + 1; j <= e; j++) {
if(dis(a[i],a[j]) < minimum) {
minimum = dis(a[i],a[j]);
if(minimum < bestmin) {
bestmin = minimum;
u = a[i].pos;
v = a[j].pos;
}
}
}
}
return minimum;
}
long long int findclose(points a[],int k, long long int d)
{
int i;
int j;
long long int min;
min = d;
sort(a,a+k,ycompare);
for(i = 0; i < k; i++) {
for(j = i + 1; j < k && (a[j].y - a[i].y) < min; j++) {
if(dis(a[i],a[j]) < min) {
min = dis(a[i],a[j]);
if(min < bestmin) {
bestmin = min;
u = a[i].pos;
v = a[j].pos;
}
}
}
}
return min;
}
long long int closepoints(points a[],int s, int e)
{
int n = e - s + 1;
int mid = (s + e) / 2;
int mid1 = a[mid].x;
if(n <= 3) {
return brute(a,s,e);
}
long long int l = closepoints(a,s,mid);
long long int r = closepoints(a,mid + 1,e);
//cout<<l<<' '<<r<<endl;
long long int m = min(l,r);
points b[n];
int k;
int i;
//cout<<mid1<<endl;
k = 0;
for(i = s; i <= e; i++) {
if(abs(mid1 - a[i].x) < m) {
b[k] = a[i];
k++;
//cout<<i<<endl;
}
}
return min(m,findclose(b,k,m));
}
int main()
{
int n;
points a[50006];
int i;
cout << setiosflags(ios::fixed) << setprecision(6);
cin>>n;
for(i = 0; i < n; i++) {
cin>>a[i].x>>a[i].y;
a[i].pos = i;
}
sort(a,a+n,xcompare);
closepoints(a,0,n-1);
if(u > v) {
swap(u,v);
}
cout<<u<<' '<<v<<' '<<sqrt((double)bestmin)<<endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCB1OwppbnQgdjsKbG9uZyBsb25nIGludCBiZXN0bWluID0gMTAwMDAwMDAwMDAwMDA7CmxvbmcgbG9uZyBpbnQgbWluaW11bSA9IDEwMDAwMDAwMDAwMDAwOwpzdHJ1Y3QgcG9pbnRzCnsKICAgIGxvbmcgbG9uZyBpbnQgeDsKICAgIGxvbmcgbG9uZyBpbnQgeTsKICAgIGludCBwb3M7Cn07CmludCB4Y29tcGFyZShwb2ludHMgYSwgcG9pbnRzIGIpCnsKICAgIHJldHVybihhLnggPCBiLngpOwp9CmludCB5Y29tcGFyZShwb2ludHMgYSwgcG9pbnRzIGIpCnsKICAgIHJldHVybiAoYS55IDwgYi55KTsKfQpsb25nIGxvbmcgaW50IGRpcyhwb2ludHMgYSxwb2ludHMgYikKewogICAgCiAgICByZXR1cm4gKCgoYS54IC0gYiAueCkgKiAoYS54IC0gYi54KSkgKyAoKGEueSAtIGIueSkgKiAoYS55IC0gYi55KSkpOwogICAgCn0KbG9uZyBsb25nIGludCBicnV0ZShwb2ludHMgYVtdLGludCBzLGludCBlKQp7CiAgICBpbnQgaTsKICAgIGludCBqOwogICAgaW50IG47CiAgICBpbnQgYzsKICAgIGludCBkOwogICAgaW50IGw7CiAgICBpbnQgcjsKICAgIG4gPSBlIC0gcyArIDE7CgogICAgZm9yKGkgPSBzOyBpIDw9IGUgOyBpKyspIHsKICAgICAgICBmb3IoaiA9IGkgKyAxOyBqIDw9IGU7IGorKykgewogICAgICAgICAgICBpZihkaXMoYVtpXSxhW2pdKSA8IG1pbmltdW0pIHsKICAgICAgICAgICAgICAgIG1pbmltdW0gPSBkaXMoYVtpXSxhW2pdKTsKICAgICAgICAgICAgICAgIGlmKG1pbmltdW0gPCBiZXN0bWluKSB7CiAgICAgICAgICAgICAgICAgICAgYmVzdG1pbiA9IG1pbmltdW07CiAgICAgICAgICAgICAgICAgICAgdSA9IGFbaV0ucG9zOwogICAgICAgICAgICAgICAgICAgIHYgPSBhW2pdLnBvczsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gbWluaW11bTsKfQpsb25nIGxvbmcgaW50IGZpbmRjbG9zZShwb2ludHMgYVtdLGludCBrLCBsb25nIGxvbmcgaW50IGQpCnsKCgogICAgaW50IGk7CiAgICBpbnQgajsKICAgIGxvbmcgbG9uZyBpbnQgbWluOwogICAgbWluID0gZDsKICAgIAogICAgc29ydChhLGErayx5Y29tcGFyZSk7CgoKICAgIGZvcihpID0gMDsgaSA8IGs7IGkrKykgewogICAgICAgIGZvcihqID0gaSArIDE7IGogPCBrICYmIChhW2pdLnkgLSBhW2ldLnkpIDwgbWluOyBqKyspIHsKICAgICAgICAgICAgaWYoZGlzKGFbaV0sYVtqXSkgPCBtaW4pIHsKICAgICAgICAgICAgICAgIG1pbiA9IGRpcyhhW2ldLGFbal0pOwogICAgICAgICAgICAgICAgaWYobWluIDwgYmVzdG1pbikgewogICAgICAgICAgICAgICAgICAgIGJlc3RtaW4gPSBtaW47CiAgICAgICAgICAgICAgICAgICAgdSA9IGFbaV0ucG9zOwogICAgICAgICAgICAgICAgICAgIHYgPSBhW2pdLnBvczsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CgogICAgcmV0dXJuIG1pbjsKfQpsb25nIGxvbmcgaW50ICBjbG9zZXBvaW50cyhwb2ludHMgYVtdLGludCBzLCBpbnQgZSkKewogICAgaW50IG4gPSBlIC0gcyArIDE7CiAgICAKCgogICAgaW50IG1pZCA9IChzICsgZSkgLyAyOwogICAgaW50IG1pZDEgPSBhW21pZF0ueDsKICAgIGlmKG4gPD0gMykgewogICAgICAgcmV0dXJuICBicnV0ZShhLHMsZSk7CiAgICB9CgogICAgbG9uZyBsb25nIGludCBsID0gY2xvc2Vwb2ludHMoYSxzLG1pZCk7CiAgICBsb25nIGxvbmcgaW50IHIgPSBjbG9zZXBvaW50cyhhLG1pZCArIDEsZSk7CiAgICAvL2NvdXQ8PGw8PCcgJzw8cjw8ZW5kbDsKCiAgICBsb25nIGxvbmcgaW50IG0gPSBtaW4obCxyKTsKCiAgICBwb2ludHMgYltuXTsKICAgIGludCBrOwogICAgaW50IGk7CiAgICAKICAgIC8vY291dDw8bWlkMTw8ZW5kbDsKICAgIGsgPSAwOwoKICAgIGZvcihpID0gczsgaSA8PSBlOyBpKyspIHsKICAgICAgICBpZihhYnMobWlkMSAtIGFbaV0ueCkgPCBtKSB7CiAgICAgICAgICAgIGJba10gPSBhW2ldOwogICAgICAgICAgICBrKys7CgogICAgICAgICAgICAvL2NvdXQ8PGk8PGVuZGw7CiAgICAgICAgfQogICAgfQoKCiAgICByZXR1cm4gbWluKG0sZmluZGNsb3NlKGIsayxtKSk7Cgp9CmludCBtYWluKCkKewogICAgaW50IG47CiAgICBwb2ludHMgYVs1MDAwNl07CiAgICBpbnQgaTsKCiAgICBjb3V0IDw8IHNldGlvc2ZsYWdzKGlvczo6Zml4ZWQpIDw8IHNldHByZWNpc2lvbig2KTsKCiAgICBjaW4+Pm47CiAgICBmb3IoaSA9IDA7IGkgPCBuOyBpKyspIHsKICAgICAgICBjaW4+PmFbaV0ueD4+YVtpXS55OwogICAgICAgIGFbaV0ucG9zID0gaTsKICAgIH0KCiAgICBzb3J0KGEsYStuLHhjb21wYXJlKTsKCgogICAgY2xvc2Vwb2ludHMoYSwwLG4tMSk7CiAgICBpZih1ID4gdikgewogICAgICAgIHN3YXAodSx2KTsKICAgIH0KICAgIGNvdXQ8PHU8PCcgJzw8djw8JyAnPDxzcXJ0KChkb3VibGUpYmVzdG1pbik8PGVuZGw7Cn0KCg==