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 <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#define EPS 1e-10
#define INF 1e5
using namespace std;

double add(double a,double b){
	if(fabs(a+b)<EPS*(fabs(a)+fabs(b)))return 0.0;
	return a+b;
}

struct P{
	double x,y;
	P(){}
	P(double xx,double yy){
		x=xx;
		y=yy;
	}
	P operator +(P p){
		return P(add(x,p.x),add(y,p.y));
	}
	P operator -(P p){
		return P(add(x,-p.x),add(y,-p.y));
	}
	P operator *(double d){
		return P(x*d,y*d);
	}
};

struct Segment{
	P p1,p2;
	Segment(){}
	Segment(P pp1,P pp2){
		p1=pp1;
		p2=pp2;
	}
};
typedef P Vector;
typedef Segment Line;
typedef vector<P> Polygon;

double norm(P p){
	return add(p.x*p.x,p.y*p.y);
}

double abs(P p){
	return sqrt(norm(p));
}

double dot(P a,P b){
	return add(a.x*b.x,a.y*b.y);
}

double cross(P a,P b){
	return add(a.x*b.y,-a.y*b.x);
}

int ccw(P p0,P p1,P p2){
	Vector a=p1-p0;
	Vector b=p2-p0;
	if(cross(a,b)>EPS)return 1;
	if(cross(a,b)<EPS)return -1;
	if(dot(a,b)<-EPS)return 2;
	if(norm(a)<norm(b))return -2;
	return 0;
}

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

double getDistanceSP(Segment s,P p){
	if(dot(s.p2-s.p1,p-s.p1)<0.0)return abs(p-s.p1);
	if(dot(s.p1-s.p2,p-s.p2)<0.0)return abs(p-s.p2);
	return getDistanceLP(s,p);
}

int contains(Polygon& g,P p){
	int N=g.size();
	bool x=false;
	for(int i=0;i<N;i++){
		P a=g[i]-p,b=g[(i+1)%N]-p;
		if(abs(cross(a,b))<EPS && dot(a,b)<EPS)return 1;
		if(a.y>b.y)swap(a,b);
		if(a.y<EPS && EPS<b.y && cross(a,b)>EPS)x=!x;
	}
	return (x?2:0);
}

double getDistancePP(Polygon& g,P p){
	double res=INF;
	int n=g.size();
	for(int i=0;i<n;i++){
		P p1=g[i],p2=g[(i+1)%n];
		res=min(res,getDistanceSP(Segment(p1,p2),p));
	}
	if(contains(g,p)!=2)res=-res;
	return res;
}

double Cx(Polygon& g, double x){
	double l=-1.0,r=10001;
	for(int i=0;i<100;i++){
		double ml=(l*2.0+r)/3.0;
		double mr=(l+r*2.0)/3.0;
		if(getDistancePP(g,P(x,ml))<getDistancePP(g,P(x,mr)))l=ml;
		else r=mr;
	}
	return getDistancePP(g,P(x,l));
}

int main(void){
	int n;
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		Polygon g;
		for(int i=0;i<n;i++){
			P p;
			scanf("%lf%lf",&p.x,&p.y);
			g.push_back(p);
		}
		double l=-1.0,r=10001;
		for(int i=0;i<100;i++){
			double ml=(l*2.0+r)/3.0;
			double mr=(l+r*2.0)/3.0;
			if(Cx(g,ml)<Cx(g,mr))l=ml;
			else r=mr;
		}
		printf("%.10f\n",Cx(g,l));
	}
	return 0;
}