program solution_bad1;

{$APPTYPE CONSOLE}

uses math;

const
  MAXN = 100;
  MAXX = 10000;
  eps = 1e-8;

var
  n, i, j: integer;
  x, y: array [1..MAXN+1] of integer;
  minp, maxp, buf: extended;
  a: array [1..4*MAXN+1] of extended;
  xx, yy: array[1..MAXN] of extended;

function sign(x:integer):integer;
begin
  if x<0 then result := -1
  else if x>0 then result := 1
  else result := 0;
end;

function correct_polygon: boolean;
 var
   i, j, s1, s2: integer;
begin
  result := false;
  for i:=1 to n do
    for j:= i+1 to n do if (x[i]=x[j]) and (y[i]=y[j]) then exit;
  for i:= 1 to n-1 do
    if (x[i+1]-x[i])*(y[i+2]-y[i])-(x[i+2]-x[i])*(y[i+1]-y[i]) = 0 then exit;
  for i:= 1 to n do begin
    s1 := 0;
    for j:=1 to n do
      if (i<>j) and (i+1<>j) and ((i+1) mod n <> j) then begin
        s2 := sign((x[i+1]-x[i])*(y[j]-y[i])-(x[j]-x[i])*(y[i+1]-y[i]));
        if s2 = 0 then exit;
        if s1 = 0 then s1 := s2
        else if s1*s2 < 0 then exit;
      end;
  end;
  result := true;
end;

// rotate point (x,y) around (x0,y0) by angle phi counter-clockwise.
procedure rotate(x,y,x0,y0,phi: extended; var xr, yr: extended);
begin
  xr := (x-x0)*cos(phi) - (y-y0)*sin(phi) + x0;
  yr := (x-x0)*sin(phi) + (y-y0)*cos(phi) + y0;
end;

procedure relax(phi: extended);
 var
   i: integer;
   r, min, max: extended;
begin
  for i:=1 to n do rotate(x[i],y[i],0,0,phi,xx[i],yy[i]);
  min:= 1e8; max:= -1e8;
  for i:=1 to n do begin
    if xx[i]>max then max:= xx[i];
    if xx[i]<min then min:= xx[i];
  end;
  r := max-min;
  min:= 1e8; max:= -1e8;
  for i:=1 to n do begin
    if yy[i]>max then max:= yy[i];
    if yy[i]<min then min:= yy[i];
  end;
  r := r + max-min;
  if r > maxp then maxp:= r;
  if r<minp then minp := r;
end;

begin
//  reset(input,'input.txt');
//  rewrite(output,'output.txt');

  //reading input
  read(n);

  assert( (n>=3) and (n<=MAXN));

  for i:=1 to n do begin
    read(x[i],y[i]);
    assert( (abs(x[i])<=MAXX) and (abs(y[i])<=MAXX) );
  end;
  x[n+1]:=x[1]; y[n+1]:=y[1];

  assert( correct_polygon );

  // solving

  minp := 1e8; maxp := -1;
  
  for i:=1 to n do begin
    if x[i]=x[i+1] then begin
      a[4*(i-1)+1] := pi/2.0;
      a[4*(i-1)+2] := 3.0*pi/2.0;
    end else begin
      buf := arctan((y[i+1]-y[i])/(x[i]-x[i+1]));
      if buf < 0.0 then buf := buf + pi;
      a[4*(i-1)+1] := buf;
      a[4*(i-1)+2] := buf+pi;
    end;
    if y[i]=y[i+1] then begin
      a[4*(i-1)+3] := pi/2.0;
      a[4*(i-1)+4] := 3.0*pi/2.0;
    end else begin
      buf := arctan((x[i]-x[i+1])/(y[i]-y[i+1]));
      if buf < 0.0 then buf := buf + pi;
      a[4*(i-1)+3] := buf;
      a[4*(i-1)+4] := buf+pi;
    end;
  end;

  for i:=1 to 4*n do
    for j:=i+1 to 4*n do
      if a[j] < a[i] then begin
        buf:= a[i]; a[i]:= a[j]; a[j]:= buf;
      end;

  a[4*n+1]:= a[1];

  // find minimum
  for i:= 1 to 4*n do begin
    relax(a[i]); relax(a[i+1]);
    if (abs(a[i]-a[i+1])<eps) then continue;
  end;

  // trying to find maximum
  buf := 0.0;
  while (buf < 0.5*pi+eps) do begin
    relax(buf);
    buf := buf + 0.00001;
  end;

  //output result
  write(minp:0:8,' ',maxp:0:8);
end.