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 <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>

using namespace std;

const double EPS=1e-8;

template<class T>
ostream& operator<<(ostream& os, const vector<T>& vs) {
    if (vs.empty()) return os << "[]";
    os << "[" << vs[0];
    for (int i = 1; i < vs.size(); i++) os << " " << vs[i];
    return os << "]";
}

struct Point {
    double x, y;
    Point() {}
    Point(double x, double y) : x(x), y(y) {}
    Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
    Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
    Point operator*(double k) const { return Point(k * x, k * y); }
    Point operator/(double k) const { return Point(x / k, y / k); }
    Point operator-() const { return Point(-x, -y); }
};
double dot(const Point& a, const Point& b) { return a.x * b.x + a.y * b.y; }
double cross(const Point& a, const Point& b) { return a.x * b.y - a.y * b.x; }
double norm(const Point& a) { return sqrt(dot(a, a)); }
Point rot90(const Point& p) { return Point(-p.y, p.x); } // 反時計回りに90度回転 
ostream& operator<<(ostream& os, const Point& p) { return os << "(" << p.x << "," << p.y << ")"; }
istream& operator>>(istream& is, Point& p) { return is >> p.x >> p.y; }

int ccw(Point a, Point b, Point c){
    b = b - a; c = 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 直線
}

struct Segment {
    Point a, b;
    Segment() {}
    Segment(const Point& a, const Point& b) : a(a), b(b) {}
};
Point projection(const Segment& l, const Point& p) {
    Point u = (p - l.a), v = (l.b - l.a);
    return l.a + (v / norm(v)) * (dot(u, v) / norm(v));
}
bool intersects(const Segment& s, const Segment& t) {
    return ccw(s.a, s.b, t.a) * ccw(s.a, s.b, t.b) <= 0 && ccw(t.a, t.b, s.a) * ccw(t.a, t.b, s.b) <= 0;
}
double dist(const Segment& s, const Point& p) {
    Point q = projection(Segment(s.a, s.b), p);
    Segment t(p, q);
    if (intersects(s, t)) return norm(t.b - t.a);
    return min(norm(s.a - p), norm(s.b - p));
}
Point crosspoint(const Segment& s, const Segment& t) {
    assert(intersects(s, t));
    Point u = s.b - s.a,
          v = t.b - t.a;
    return s.a - u * cross(v, t.a - s.a) / cross(u, v);
}

struct Circle {
    Point p;
    double r;
    Circle() {}
    Circle(const Point& p, double r) : p(p), r(r) {}
};
ostream& operator<<(ostream& os, const Circle& c) {
    return os << "Circle[" << c.p << "," << c.r << "]";
}

typedef vector<Point> Polygon;

bool contains(const Polygon& c, const Point& p) {
    int n = int(c.size());
    int x = ccw(p, c[0], c[1]);
    for (int i = 0; i < n; i++) {
        Point a = c[i];
        Point b = c[(i + 1) % n];
        if (x != ccw(p, a, b)) return false;
    }
    return true;
}

bool contains(const Polygon& c, const Circle& cir) {
    if (!contains(c, cir.p)) { return false; }
    int n = int(c.size());
    for (int i = 0; i < n; i++) {
        Point a = c[i];
        Point b = c[(i + 1) % n];
        Segment s(a, b);
        if (dist(s, cir.p) + EPS < cir.r) return false;
    }
    return true;
}

void add_moved_segment(const Segment& s, double r, vector<Segment>& ss) {
    Point v = s.b - s.a;
    Point u = rot90(v) / norm(v) * r;
    ss.push_back(Segment(s.a + u, s.b + u));
    u = -rot90(v) / norm(v) * r;
    ss.push_back(Segment(s.a + u, s.b + u));
}

int N;
vector<Point> P;

bool input() {
    cin >> N;
    if (N == 0) return false;
    P.clear(); P.resize(N);
    for (int i = 0; i < N; i++) {
        cin >> P[i];
    }
    return true;
}

const double INF = 1e5;

bool C(double r) {
    vector<Segment> ss;
    for (int i = 0; i < N; i++) {
        Segment e(P[i], P[(i + 1) % N]);
        add_moved_segment(e, r, ss);
    }
    int M = int(ss.size());
    vector<Point> ps;
    for (int i = 0; i < M; i++) {
        for (int j = i + 1; j < M; j++) {
            if (!intersects(ss[i], ss[j])) continue;
            ps.push_back(crosspoint(ss[i], ss[j]));
        }
    }
    for (int i = 0; i < ps.size(); i++) {
        Point& p = ps[i];
        if (contains(P, Circle(p, r))) return true;
    }
    return false;
}

void solve() {
    double lb = 0, ub = INF;
    for (int _ = 0; _ < 50; _++) {
        double mid = (lb + ub) / 2;
        (C(mid) ? lb : ub) = mid;
    }
    printf("%.12lf\n", lb);
}

int main() {
    while (input()) solve();
    return 0;
}