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;

using ld = long double;
const ld eps = 1e-10, pi = acos(-1.0);

bool eq(ld a, ld b) {
	return abs(a - b) < eps;
}

using Point = complex<ld>;
class Line {
public:
	Point a, b;
	Line() {}
	Line(Point a, Point b) : a(a), b(b) {}
};

ld dot(Point a, Point b) {
	return real(conj(a) * b);
}

ld cross(Point a, Point b) {
	return imag(conj(a) * b);
}

int ccw(Point a, Point b, Point c) {
	b -= a, c -= a;
	if (cross(b, c) > eps) return 1;	// a,b,c??????????¨???¨???
	if (cross(b, c) < -eps) return -1;	// a,b,c???????¨???????
	if (dot(b, c) < 0) return 2;		// c,a,b????????§??´???
	if (norm(b) < norm(c)) return -2;	// a,b,c???????????´???
	return 0;							// a,c,b???????????´???
}

bool isis_ll(Line l, Line m) {
	return abs(cross(l.b - l.a, m.b - m.a)) > eps;
}

bool isis_ls(Line l, Line s) {
	return (cross(l.b - l.a, s.a - l.a) * cross(l.b - l.a, s.b - l.a) < eps);
}

bool isis_lp(Line l, Point p) {
	return abs(cross(l.b - p, l.a - p)) < eps;
}

bool isis_sp(Line s, Point p) {
	return abs(s.a - p) + abs(s.b - p) - abs(s.b - s.a) < eps;
}

Point proj(Line l, Point p) {
	ld t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
	return l.a + t * (l.a - l.b);
}

Point is_ll(Line s, Line t) {
	Point sv = s.b - s.a, tv = t.b - t.a;
	assert(cross(sv, tv) != 0);
	return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}

bool isis_ss(Line s, Line t) {
	if (isis_ll(s, t)) return isis_ls(s, t) && isis_ls(t, s);
	return isis_sp(s, t.a) || isis_sp(s, t.b) || isis_sp(t, s.a);
}

ld dist_lp(Line l, Point p) {
	return abs(p - proj(l, p));
}

ld dist_ll(Line l, Line m) {
	return isis_ll(l, m) ? 0 : dist_lp(l, m.a);
}

ld dist_ls(Line l, Line s) {
	return isis_ls(l, s) ? 0 : min(dist_lp(l, s.a), dist_lp(l, s.b));
}

ld dist_sp(Line s, Point p) {
	Point r = proj(s, p);
	return isis_sp(s, r) ? abs(r - p) : min(abs(s.a - p), abs(s.b - p));
}

ld dist_ss(Line s, Line t) {
	if (isis_ss(s, t)) return 0;
	return min({ dist_sp(s, t.a), dist_sp(s, t.b), dist_sp(t, s.a), dist_sp(t, s.b) });
}

Line bi_deg(Point a, Point b, Point c) {
	Point d = (b - c) / (a - c);
	ld deg = atan2l(d.imag(), d.real()) / 2.0;
	return Line(c, c + (Point(cosl(deg), sinl(deg)) * (a - c)));
}

Point H(Line a, Line b, Line c) {
	if (!isis_ll(a, b)) {
		Point x = is_ll(b, c), y = is_ll(c, a);
		return is_ll(bi_deg(b.a, c.b, x), bi_deg(c.a, a.b, y));
	}
	else if (!isis_ll(b, c)) {
		Point x = is_ll(c, a), y = is_ll(a, b);
		return is_ll(bi_deg(c.a, a.b, x), bi_deg(a.a, b.b, y));
	}
	else {
		Point x = is_ll(a, b), y = is_ll(b, c);
		return is_ll(bi_deg(a.a, b.b, x), bi_deg(b.a, c.b, y));
	}
}

int main()
{
	cin.sync_with_stdio(false);
	cout << fixed << setprecision(7);
	int n;
	while (cin >> n, n) {
		vector<Point> p(n);
		for (int i = 0, x, y; i < n; i++) {
			cin >> x >> y;
			p[i] = Point(x, y);
		}
		vector<Line> l(n);
		for (int i = 0; i < n; i++) {
			l[i] = bi_deg(p[i], p[(i + 2) % n], p[(i + 1) % n]);
		}
		vector<Line> e(n);
		for (int i = 0; i < n; i++) {
			e[i] = Line(p[i], i + 1 < n ? p[i + 1] : p[0]);
		}
		vector<Point> all;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				for (int k = j + 1; k < n; k++) {
					if (isis_ll(e[i], e[j]) || isis_ll(e[j], e[k]) || isis_ll(e[k], e[i])) {
						all.push_back(H(e[i], e[j], e[k]));
					}
				}
			}
		}
		ld res = 0;
		for (auto is : all) {
			bool flag = false;
			for (int k = 0; k < n; k++) {
				if (ccw(p[k], k + 1 < n ? p[k + 1] : p[k + 1 - n] , is) != 1) {
					flag = true;
					break;
				}
			}
			if (flag) {
				continue;
			}
			ld mi = 1e10;
			for (int k = 0; k < n; k++) {
				mi = min(mi, dist_lp(e[k], is));
			}
			res = max(res, mi);
		}
		cout << res << endl;
	}
	return 0;
}