#include<bits/stdc++.h>
using namespace std;
#define int long long
const int MAXN = 200010;
int n, xi[MAXN], yi[MAXN], ans;
int dis(int a, int b, int c, int d) {
return (a - c) * (a - c) + (b - d) * (b - d);
}
signed main() {
freopen("closest.in", "r", stdin);
freopen("closest.out", "w", stdout);
cin >> n;
for(int i = 1; i <= n; i ++) {
cin >> xi[i] >> yi[i];
}
ans = 1e12;
for(int i = 1; i <= n; i ++) {
for(int j = i + 1; j <= n; j ++) {
ans = min(ans, dis(xi[i], yi[i], xi[j], yi[j]));
}
}
printf("%0.4f", sqrt(ans));
return 0;
}