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 <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <cassert>
#include <map>
#include <set>
#include <complex>
using namespace std;

using ld = long double;
using P = complex<ld>;
using G = vector<P>;
const ld pi = acos(-1);
const ld eps = 1e-10;
const ld inf = 1e12;

ld cross(const P& a, const P& b) { return a.real()*b.imag() - a.imag()*b.real(); }
ld dot(const P& a, const P& b) { return a.real()*b.real() + a.imag()*b.imag(); }

enum { CCW = +1, CW = -1, BEHIND = +2, FRONT = -2, ON = 0 };
int ccw(P a, P b, P c) {
	b -= a; c -= a;
	if(cross(b, c) > eps)  return CCW;    // counter clockwise
	if(cross(b, c) < -eps) return CW;     // clockwise
	if(dot(b, c) < 0)      return BEHIND; // c--a--b on line
	if(norm(b) < norm(c))  return FRONT;  // a--b--c on line
	return ON;
}

struct L : public vector<P> {
	L(const P &a = 0, const P &b = 0) {
		push_back(a); push_back(b);
	}
	L(ld A, ld B, ld C) { // Ax + By + C = 0
		if(A < eps) *this = L(P(0, -C / B), P(1, -C / B));
		else if(B < eps) *this = L(P(-C / A, 0), P(-C / A, 1));
		*this = L(P(0, -C / B), P(-C / A, 0));
	}
	int ccw(const P& p) {
		return ::ccw((*this)[0], (*this)[1], p);
	}
};

P projection(const L &l, const P &p) {
	ld t = dot(p - l[0], l[0] - l[1]) / norm(l[0] - l[1]);
	return l[0] + t*(l[0] - l[1]);
}

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


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

P crosspointLL(const L &l, const L &m) {
	ld A = cross(l[1] - l[0], m[1] - m[0]);
	ld 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]);
}

#define curr(pol, i) pol[i]
#define next(pol, i) pol[(i+1)%pol.size()]
G convex_cut(const G& pol, const L& l) {
	G res;
	for(int i = 0; i < pol.size(); ++i) {
		P A = curr(pol, i), B = next(pol, i);
		if(ccw(l[0], l[1], A) != -1) res.push_back(A);
		if(ccw(l[0], l[1], A)*ccw(l[0], l[1], B) < 0)
			res.push_back(crosspointLL(L(A, B), l));
	}
	return res;
}

int n;
G ps;
vector<L> ls;
bool check(double x) {
	G res = ps;
	for(int i = 0; i < n; i++) {
		P a = ls[i][1] - ls[i][0];
		P d = a * polar(x / abs(a), pi / 2);
		L lx = L(ls[i][0] + d, ls[i][1] + d);
		res = convex_cut(res, lx);
		if(res.size() < 3) return false;
	}
	return true;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(cin >> n, n) {
		ps.clear();
		for(int i = 0; i < n; i++) {
			ld x, y;
			cin >> x >> y;
			ps.push_back(P(x, y));
		}
		ls.clear();
		for(int i = 0; i < n; i++) {
			ls.push_back(L(ps[i], ps[(i + 1) % n]));
		}

		double ok = 0, ng = 1e9;
		for(int loop = 0; loop < 200; loop++) {
			double x = (ok + ng) / 2;
			if(check(x)) ok = x;
			else ng = x;
		}

		cout << fixed << setprecision(15) << ok << endl;
	}
}