Problem: The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: "Where is the most distant point from the sea?" The answer to this question for Honshu was found in 1996. The most distant point is located in former Usuda Town, Nagano Prefecture, whose distance from the sea is 114.86 km.

In this problem, you are asked to write a program which, given a map of an island, finds the most distant point from the sea in the island, and reports its distance from the sea. In order to simplify the problem, we only consider maps representable by convex polygons.



Input

The input consists of multiple datasets. Each dataset represents a map of an island, which is a convex polygon. The format of a dataset is as follows.


n
x1    y1
.
.
.
xn    yn


Every input item in a dataset is a non-negative integer. Two input items in a line are separated by a space.

n in the first line is the number of vertices of the polygon, satisfying 3 ≤ n ≤ 100. Subsequent n lines are the x- and y-coordinates of the n vertices. Line segments (xi, yi) - (xi+1, yi+1) (1 ≤ i ≤ n - 1) and the line segment (xn, yn) - (x1, y1) form the border of the polygon in counterclockwise order. That is, these line segments see the inside of the polygon in the left of their directions. All coordinate values are between 0 and 10000, inclusive.

You can assume that the polygon is simple, that is, its border never crosses or touches itself. As stated above, the given polygon is always a convex one.

The last dataset is followed by a line containing a single zero.

Output

For each dataset in the input, one line containing the distance of the most distant point from the sea should be output. An output line should not contain extra characters such as spaces.

The answer should not have an error greater than 0.00001 (10-5 ). You may output any number of digits after the decimal point, provided that the above accuracy condition is satisfied.

Example

Input

4
0 0
10000 0
10000 10000
0 10000
3
0 0
10000 0
7000 1000
6
0 40
100 20
250 40
250 70
100 90
0 70
3
0 0
10000 10000
5000 5001
0


Output

5000.000000
494.233641
34.542948
0.353553

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define X real()
#define Y imag()

typedef double D;
typedef complex<D> P;

const D eps=1e-9;
const D EPS=1e-7;
const D inf=1e12;

struct L : public vector<P> { // line and segment
  L(const P& a,const P &b){
    push_back(a);
    push_back(b);
  }
};

D cross(P a,P b){ return (conj(a)*b).Y; }

P projection(L l,P p){
  P b=l[1]-l[0],c=p-l[0];
  return l[0]+b*(c/b).X;
}

bool intersectSP(L s,P p){
  return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0])<eps;
}

D distanceSP(L s,P p) {
  const P r=projection(s,p);
  return intersectSP(s,r)?abs(r-p):min(abs(s[0]-p),abs(s[1]-p));
}

P crosspoint(L l,L m) {
  D A=cross(l[1]-l[0],m[1]-m[0]);
  D B=cross(l[1]-l[0],l[1]-m[0]);
  if (abs(A)<eps&&abs(B)<eps) return m[0]; // same line
  if (abs(A)<eps) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
  return m[0]+B/A*(m[1]-m[0]);
}

int N;
P ps[101];

const double GR=(sqrt(5.0)-1.0)/2.0;

double f(double x,double y){
  // actual content of func
  P p=P(x,y);
  double res=inf;
  rep(i,N)minch(res,distanceSP(L(ps[i],ps[(i+1)%N]),p));
  return res;
}

double yargmax(double crtx){
  double lb=inf,ub=-inf;
  rep(i,N){
    D mnx=min(ps[i].X,ps[(i+1)%N].X);
    D mxx=max(ps[i].X,ps[(i+1)%N].X);
    if(mnx-eps<crtx&&crtx<mxx+eps){
      if(abs(ps[i].X-ps[(i+1)%N].X)<eps){
        minch(lb,min(ps[i].Y,ps[(i+1)%N].Y));
        maxch(ub,max(ps[i].Y,ps[(i+1)%N].Y));
      }else{
        P cp=crosspoint(L(ps[i],ps[(i+1)%N]),L(P(crtx,-1000000),P(crtx,+1000000)));
        minch(lb,cp.Y);
        maxch(ub,cp.Y);
      }
    }
  }
  double x=ub-GR*(ub-lb),y=lb+GR*(ub-lb);
  double vx=f(crtx,x),vy=f(crtx,y);
  while(ub-lb>EPS){
    if(vx<vy){
      lb=x; x=y; vx=vy; y=lb+GR*(ub-lb); vy=f(crtx,y);
    }else{
      ub=y; y=x; vy=vx; x=ub-GR*(ub-lb); vx=f(crtx,x);
    }
  }
  return (x+y)/2.0;
}

D xmax(D mnx,D mxx){
  D lb=mnx,ub=mxx;
  D x=ub-GR*(ub-lb),y=lb+GR*(ub-lb);
  double vx=f(x,yargmax(x)),vy=f(y,yargmax(y));
  while(ub-lb>EPS){
    if(vx<vy){
      lb=x; x=y; vx=vy; y=lb+GR*(ub-lb); vy=f(y,yargmax(y));
    }else{
      ub=y; y=x; vy=vx; x=ub-GR*(ub-lb); vx=f(x,yargmax(x));
    }
  }
  return f((x+y)/2.0,yargmax((x+y)/2.0));
}

int main(){
  while(1){
    cin>>N;
    if(N==0)break;
    rep(i,N){
      D x,y;
      cin>>x>>y;
      ps[i]=P(x,y);
    }
    D mnx=inf,mxx=-inf;
    rep(i,N){
      minch(mnx,ps[i].X); maxch(mxx,ps[i].X);
    }
    printf("%.10f\n", xmax(mnx,mxx));
  }
  return 0;
}