#include<bits/stdc++.h>
#define inf 1<<29
#define linf (1e16)
#define eps (1e-8)
#define Eps (1e-12)
#define mod 1000000007
#define pi acos(-1.0)
#define phi (1.0+sqrt(5.0))/2.0
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define pd(a) printf("%.10f\n",(double)(a))
#define pld(a) printf("%.10Lf\n",(ld)(a))
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(a)-1;(b)<=i;i--)
#define Unique(v) v.erase(unique(all(v)),v.end())
#define equals(a,b) (fabs((a)-(b))<eps)
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<int,double> pid;
typedef pair<double,int> pdi;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<pii> vpi;
#define track() cout<<"AAAAAAAAA"<<endl;

class Point{
public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y){}

  Point operator+(Point p){ return Point(x+p.x,y+p.y);}
  Point operator-(Point p){ return Point(x-p.x,y-p.y);}
  Point operator*(double k){ return Point(x*k,y*k);}
  Point operator/(double k){ return Point(x/k,y/k);}
  bool operator<(Point p)const{ return equals(x,p.x) ? y-p.y<-eps : x-p.x<-eps; }
  bool operator==(Point p)const{ return fabs(x-p.x)<eps && fabs(y-p.y)<eps;}

  double abs(){ return sqrt(norm());}
  double norm(){ return (x*x+y*y);}
};
typedef Point Vector;
typedef vector<Point> Polygon;

class Segment{
public:
  Point p1,p2;
  Segment(Point p1=Point(),Point p2=Point()):p1(p1),p2(p2){}
};
typedef Segment Line;

double norm(Vector a){ return (a.x*a.x+a.y*a.y);}
double abs(Vector a){ return sqrt(norm(a));}
double dot(Vector a,Vector b){ return (a.x*b.x+a.y*b.y);}
double cross(Vector a,Vector b){ return (a.x*b.y-a.y*b.x);}

double Area(Polygon p){
  double area=0.0;
  int n=p.size();
  for(int i=0;i<n;i++)area+=cross(p[i],p[(i+1)%n]);
  return area/2.0;
}

double getDistanceLP(Line l,Point p){
  return abs(cross(l.p2-l.p1,p-l.p1)/abs(l.p2-l.p1));
}

bool onLine(Line L,Point p){ return getDistanceLP(L,p)<eps; }
bool onSegment(Segment s,Point p){
  if(!onLine(s,p))return false;
  if(dot(s.p2-s.p1,p-s.p1)<-eps)return false;
  if(dot(s.p1-s.p2,p-s.p2)<-eps)return false;
  return true;
}

typedef pair<Point,Point> pp;

int n,m;
Polygon P;
vector<Point> D;
vector<pp> V;
double area;

Point cal(Point base,int i){
  double sum = 0.0,t = 0.0;
  while(1){
    t = cross(P[i]-base,P[(i+1)%n]-base)/2.0;
    if(area<sum+t)break;
    i = (i+1)%n;
    sum+=t;
  }
  double a = (area-sum)/t;
  Vector v = P[(i+1)%n]-P[i];
  return P[i]+v*a;
}

Point Search(Point base,Point a,Point b,double X){
  Vector v = b-a;
  v = v/abs(b-a);
  double L = 0.0, R = abs(b-a), M;
  FOR(i,0,50){
    M = (L+R)/2.0;
    Point c = a+v*M;
    if(X>cross(a-base,c-base)/2.0)L = M;
    else R = M;
  }
  return a+v*M;
}

double Minimum(){
  double res = inf;
  FOR(i,0,m){
    int j = (i+1)%m;
    Vector v = V[j].f-V[i].f;
    double dis = abs(v);
    double X = cross(V[j].f-V[i].f,V[i].s-V[i].f)/2.0;
    v = v/dis;
    double L=0.0,R=dis;
    FOR(k,0,50){
      double m1=(L*phi+R)/(1.0+phi);
      double m2=(L+R*phi)/(1.0+phi);
      Point p1 = V[i].f+v*m1;
      Point p2 = V[i].f+v*m2;
      double y1 = cross(V[j].f-p1,V[i].s-p1)/2.0;
      double y2 = cross(V[j].f-p2,V[i].s-p2)/2.0;
      Point p3 = Search(p1,V[i].s,V[j].s,X-y1);
      Point p4 = Search(p2,V[i].s,V[j].s,X-y2);
      double res1 = abs(p1-p3);
      double res2 = abs(p2-p4);
      if(res1<res2)R=m2;
      else L=m1;
      res = min(res,res1);
    }
  }
  return res;
}

double Maximum(){
  double res = 0.0;
  FOR(i,0,V.size())res = max(res,abs(V[i].f-V[i].s));
  return res;
}

void solve(){
  area = Area(P)/2.0;
  FOR(i,0,n)D.pb(cal(P[i],(i+1)%n));
  FOR(i,0,n){
    Segment S = Segment(P[i],P[(i+1)%n]);
    vector<pair<double,pp> > tmp;
    V.pb(mp(P[i],D[i]));
    FOR(j,0,n){
      if(D[j]==P[i])continue;
      if(D[j]==P[(i+1)%n])continue;
      if(onSegment(S,D[j]))tmp.pb(mp(abs(P[i]-D[j]),mp(D[j],P[j])));
    }
    sort(all(tmp));
    FOR(j,0,tmp.size())V.pb(tmp[j].s);
  }
  m = V.size();
  pd(Minimum());
  pd(Maximum());
  return;
}

int main()
{
  cin>>n;
  P.resize(n);
  FOR(i,0,n)cin>>P[i].x>>P[i].y;
  solve();
  return 0;
}



Measured memory_bytes: 3704