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<algorithm>
using namespace std;
struct Point { long double px, py; };
struct Segment { Point p1, p2; };
Point Minus(Point a, Point b) { return Point{ a.px - b.px,a.py - b.py }; }
long double norm(const Point& a) { return a.px * a.px + a.py * a.py; }
long double abs(const Point& a) { return sqrtl(norm(a)); }
long double dot(const Point& a, const Point& b) { return a.px * b.px + a.py * b.py; }
long double crs(const Point& a, const Point& b) { return a.px * b.py - a.py * b.px; }
long double dst(const Segment& a, const Point& b) {
	return dot(Minus(a.p2, a.p1), Minus(b, a.p1)) < 0.0 ? abs(Minus(b, a.p1)) : (dot(Minus(a.p1, a.p2), Minus(b, a.p2)) < 0.0 ? abs(Minus(b, a.p2)) : abs(crs(Minus(a.p2, a.p1), Minus(b, a.p1)) / abs(Minus(a.p2, a.p1))));
}
int contain(vector<Point> v, Point p) {
	bool in = false;
	for (int i = 0; i < v.size(); ++i) {
		Point a = Minus(v[i], p), b = Minus(v[(i + 1) % v.size()], p);
		if (a.py > b.py) swap(a, b);
		if (a.py <= 0 && 0 < b.py)
			if (crs(a, b) < 0) in = !in;
		if (crs(a, b) == 0 && dot(a, b) <= 0) return 1;
	}
	return in ? 2 : 0;
}
vector<Point>x; int n;
long double solve(long double S) {
	long double L1 = -100000.0l, R1 = 100000.0l, d1, d2, maxn2 = -1000000000.0l;
	for (int i = 0; i < 200; i++) {
		d1 = (L1 + L1 + R1) / 3;
		d2 = (L1 + R1 + R1) / 3;
		long double cnt1 = 1000000000.0l, cnt2 = 1000000000.0l;
		Point P1 = Point{ S,d1 }, P2 = Point{ S,d2 };
		if (contain(x, P1) >= 1) {
			for (int j = 0; j < n; j++) {
				Segment L1 = Segment{ x[j],x[(j + 1) % n] };
				long double W3 = dst(L1, P1);
				cnt1 = min(cnt1, W3);
			}
		}
		else {
			cnt1 = -1000000000.0l;
			for (int j = 0; j < n; j++) {
				Segment L1 = Segment{ x[j],x[(j + 1) % n] };
				long double W3 = dst(L1, P1);
				cnt1 = max(cnt1, -1.0l*W3);
			}
		}
		if (contain(x, P2) >= 1) {
			for (int j = 0; j < n; j++) {
				Segment L1 = Segment{ x[j],x[(j + 1) % n] };
				long double W4 = dst(L1, P2);
				cnt2 = min(cnt2, W4);
			}
		}
		else {
			cnt2 = -1000000000.0l;
			for (int j = 0; j < n; j++) {
				Segment L1 = Segment{ x[j],x[(j + 1) % n] };
				long double W4 = dst(L1, P2);
				cnt2 = max(cnt2, -1.0l*W4);
			}
		}
		if (cnt1 < cnt2)L1 = d1;
		if (cnt1 > cnt2)R1 = d2;
		maxn2 = max(maxn2, max(cnt1, cnt2));
	}
	return maxn2;
}
int main() {
	while (true) {
		cin >> n; x.clear(); if (n == 0)break;
		for (int i = 0; i < n; i++) { Point AA; cin >> AA.px >> AA.py; x.push_back(AA); }
		long double L = -100000.0l, R = 100000.0l, c1, c2, maxn = 0.0l;
		for (int i = 0; i < 150; i++) {
			c1 = (L + L + R) / 3;
			c2 = (L + R + R) / 3;
			long double W1 = solve(c1), W2 = solve(c2);
			if (W1 < W2)L = c1;
			if (W1 > W2)R = c2;
			maxn = max(maxn, max(W1, W2));
		}
		printf("%.16Lf\n", maxn);
	}
	return 0;
}