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 <iostream>
#include <cmath>
#include <vector>
#include <complex>
#include <cassert>
#include <algorithm>
using namespace std;

typedef complex<double> point;
typedef vector<point> polygon;

struct line : public vector<point> {
	line(point a, point b) { push_back(a); push_back(b); }
};

namespace std {
	bool operator<(const point& a, const point& b) {
		return a.real()!=b.real() ? a.real()<b.real() : a.imag()<b.imag();
	}
}

const double eps = 1e-10;
bool   equal(const double a, const double b) { return abs(a-b)<eps; }
bool   equal(const point& a, const point& b) { return abs(a-b)<eps; }
double dot  (const point& a, const point& b) { return (a*conj(b)).real(); }
double cross(const point& a, const point& b) { return (conj(a)*b).imag(); }
point  vec  (const line&  l)                 { return l[1]-l[0]; }
point  unit (const point& v)                 { return v/abs(v);  }
point  ortho(const point& v)                 { return v*point(0,1); }

int ccw(const point& a, const point& b, const point& c) {
	point u=b-a, v=c-a;
	if(cross(u,v) > 0 ) return +1; // ccw
	if(cross(u,v) < 0 ) return -1; // cw
	if(  dot(u,v) < 0 ) return +2; // cab
	if(norm(u)<norm(v)) return -2; // abc
	return 0;                      // acb
}

int ccw(const line& s, const point& p) {
	return ccw(s[0], s[1], p);
}

point crosspoint(const line& l, const line& m) {
	double A = cross(vec(l), vec(m));
	double B = cross(vec(l), l[1]-m[0]);
	if(abs(A)<eps) {			// parallel
		assert(abs(B)<eps);
		return m[0];			// sameline
	}
	return m[0] + B/A*vec(m);
}

polygon convex_cut(const polygon& g, const line& l, int f=0) {
	polygon h;
	line m(l[f%2], l[(f+1)%2]);

	for(int i=0; i<g.size(); i++) {
		const point& a = g[i];
		const point& b = g[(i+1)%g.size()];
		if(ccw(m,a) != -1) h.push_back(a);
		if(ccw(m,a)*ccw(m,b) < 0) {
			point p = crosspoint(line(a,b), m);
			if((!equal(a,p)) && (!equal(b,p))) {
				h.push_back(p);
			}
		}
	}
	return h;
}

int main()
{
	int N;
	while(cin>>N, N) {
		polygon g;
		while(N--) {
			double x,y;
			cin>>x>>y;
			g.push_back(point(x,y));
		}

		double low=0,high=5000;
		while(high-low > 1e-6)
		{
			polygon h;
			h.push_back(point(    0,    0));
			h.push_back(point(10000,    0));
			h.push_back(point(10000,10000));
			h.push_back(point(    0,10000));

			double d = (low+high)/2.0;

			for(int i=0; i<g.size(); i++) {
				point& a = g[i];
				point& b = g[(i+1)%g.size()];
				point  v = unit(ortho(b-a));

				h = convex_cut(h, line(a+d*v, b+d*v));
			}

			if(h.size()) low  = d;
			else         high = d;
		}
		cout.setf(ios::fixed);
		cout.precision(6);
		cout << (low+high)/2.0 << endl;
	}
}