#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
struct point{
double x,y;
point(double xx = 0,double yy = 0){
x = xx;
y = yy;
}
void input(){
scanf("%lf%lf",&x,&y);
}
};
bool cmpx(point a,point b){
return a.x<b.x;
}
bool cmpy(point a,point b){
return a.y<b.y;
}
double dist(point a,point b){
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
vector<point> v;
double dfs(int l,int r){
vector<point> tem;
if(l+1==r)return dist(v[l],v[r]);
int mid = (l+r)>>1;
double d1 = dfs(l,mid);
double d2 = dfs(mid,r);
double d = min(d1,d2);
for(int i=0;;i++){
if(mid-i>=l&&abs(v[mid-i].x-v[mid].x)<=d){
tem.push_back(v[mid-i]);
}else{
break;
}
}
for(int i=1;;i++){
if(mid+i<=r&&abs(v[mid+i].x-v[mid].x)<=d){
tem.push_back(v[mid+i]);
}else{
break;
}
}
sort(tem.begin(),tem.end(),cmpy);
double minn = 1e10;
for(int i= 0;i<tem.size();i++){
for(int j=i+1;j<tem.size();j++){
if(tem[j].y-tem[i].y<=minn){
minn = min(minn,dist(tem[i],tem[j]));
}else{
break;
}
}
}
return min(d,minn);
}
int main(){
int N;
while(scanf("%d",&N)!=EOF&&N){
v.clear();
for(int i=0;i<N;i++){
point tem;tem.input();
v.push_back(tem);
}
sort(v.begin(),v.end(),cmpx);
printf("%.2lf\n",dfs(0,v.size()-1)/2);
}
}