#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
struct str{
int x,y;
}map[1005];
int n;
double num = 1e8;
int main(){
cin>>n;
for(int i = 1;i <= n;i++){
cin>>map[i].x>>map[i].y;
}
for(int i = 1;i <= n;i++){
for(int j = 1;j <= n;j++){
if(i != j){
int x = map[i].x - map[j].x;
int y = map[i].y - map[j].y;
double z = sqrt(x * x + y * y);
num = min(num,z);
}
}
}
printf("%.4f",num);
}