#include<iostream>
#include<fstream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
ifstream fin("postmanb.in");
ofstream fout("postmanb.out");
int n;
int a,b;
double m;
long long max=0,min=1000000000;
long long c;
int l[100001][3]={0};
fin>>n;
for (int i=1;i<=n;i++)
fin>>l[i][1]>>l[i][2];
for (int j=2;j<n;j++)
{
for (int i=j;i<=n;i++)
{
a=l[i][1]-l[1][1];
b=l[i][2]-l[1][2];
c=a*a+b*b;
if (c>=max) max=c;
if (c<=min) min=c;
}
}
m=sqrt(double(max));
fout<<setiosflags(ios::fixed)<<setprecision(4)<<m<<endl;
m=sqrt(double(min));
fout<<setiosflags(ios::fixed)<<setprecision(4)<<m<<endl;
fin.close();
fout.close();
return 0;
}