# Quoit Design [散点中距离最近的两点距离][分治]

#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<bitset>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<vector>
#include<cstdlib>
#include<list>
#include<stack>
#include<cmath>
#include<iomanip>
using namespace std;
typedef long long LL;
void debug() {cout << "ok running!" << endl;}
struct node
{
double x, y;
}a[100005];
int temp[100005];
bool cmp1(node &a, node &b)
{
return a.x < b.x;
}
bool cmp2(int p, int q)
{
return a[p].y < a[q].y;
}
double dis(node &a, node &b)
{
return sqrt( (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) );
}
double solve(int l, int r)
{
if(l == r)
return 0;
if(l + 1 == r)
return dis(a[l], a[r]);
if(l + 2 == r)
{
double m = min(dis(a[l], a[r]), dis(a[l+1], a[r]));
return min(m, dis(a[l], a[l+1]));
}
int mid = (l + r) >> 1;
double d = min(solve(l, mid), solve(mid+1, r));
int cnt = 0;
for(int i = l; i <= r; ++i)
{
if(a[i].x >= a[mid].x-d && a[i].x <= a[mid].x+d)
temp[cnt++] = i;
}
sort(temp, temp+cnt, cmp2);
for(int i = 0; i < cnt; ++i)
{
for(int j = i + 1; j < cnt; ++j)
{
if(a[temp[j]].y - a[temp[i]].y >= d)
break;
d = min(d,  dis(a[temp[i]], a[temp[j]]));
}
}
return d;
}
int main()
{
ios::sync_with_stdio(false);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif // ONLINE_JUDGE
int n;
while(cin >> n)
{
if(n == 0) break;
for(int i = 0; i < n; ++i)
cin >> a[i].x >> a[i].y;
sort(a, a+n, cmp1);
double ans = solve(0, n-1)/2;
ios::fixed;
cout << fixed << setprecision(2) << ans << endl;
}
return 0;
}