#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
using namespace std;
struct D
{
double x,y;
} a[100100];
int tmp[100100];
double cmp(D a,D b)
{
return a.x<b.x;
}
double cmpy(int p,int q)
{
return a[p].y<a[q].y;
}
double dis(D a,D b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
double dfs(int left,int right)
{
double d;
if(left==right-1)
return dis(a[left],a[right]);
if(left==right-2)
{
d = min(dis(a[left],a[right-1]),dis(a[left+1],a[right]));
d = min(d,dis(a[left],a[right]));
return d;
}
int mid = (left+right)/2;
//printf("%d %d %lf\n",left,right,d);
d = min(dfs(left,mid),dfs(mid+1,right));
int k = 0;
for(int i = left; i <= right; i++)
{
if(a[i].x>=a[mid].x-d&&a[i].x<=a[mid].x+d)
tmp[k++] = i;
}
sort(tmp,tmp+k,cmpy);
for(int i = 0; i < k; i++)
{
for(int j = i+1; j < k; j++)
{
if(fabs(a[tmp[j]].y-a[tmp[i]].y)<d)
{
double ds = dis(a[tmp[i]],a[tmp[j]]);
if(ds<d)
d = ds;
}
else break;
}
}
return d;
}
int main()
{
int n;
while(scanf("%d",&n)&&n)
{
for(int i = 0; i < n; i++)
scanf("%lf%lf",&a[i].x,&a[i].y);
sort(a,a+n,cmp);
printf("%.2lf\n",dfs(0,n-1)/2);
memset(tmp,0,sizeof(tmp));
}
return 0;
}
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
using namespace std;
struct D
{
double x,y;
} a[100100];
int tmp[100100];
double cmp(D a,D b)
{
return a.x<b.x;
}
double cmpy(int p,int q)
{
return a[p].y<a[q].y;
}
double dis(D a,D b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
double dfs(int left,int right)
{
double d;
if(left==right-1)
return dis(a[left],a[right]);
if(left==right-2)
{
d = min(dis(a[left],a[right-1]),dis(a[left+1],a[right]));
d = min(d,dis(a[left],a[right]));
return d;
}
int mid = (left+right)/2;
//printf("%d %d %lf\n",left,right,d);
d = min(dfs(left,mid),dfs(mid+1,right));
int k = 0;
for(int i = left; i <= right; i++)
{
if(a[i].x>=a[mid].x-d&&a[i].x<=a[mid].x+d)
tmp[k++] = i;
}
sort(tmp,tmp+k,cmpy);
for(int i = 0; i < k; i++)
{
for(int j = i+1; j < k; j++)
{
if(fabs(a[tmp[j]].y-a[tmp[i]].y)<d)
{
double ds = dis(a[tmp[i]],a[tmp[j]]);
if(ds<d)
d = ds;
}
else break;
}
}
return d;
}
int main()
{
int n;
while(scanf("%d",&n)&&n)
{
for(int i = 0; i < n; i++)
scanf("%lf%lf",&a[i].x,&a[i].y);
sort(a,a+n,cmp);
printf("%.2lf\n",dfs(0,n-1)/2);
memset(tmp,0,sizeof(tmp));
}
return 0;
}