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 <iomanip>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <memory>
#include <cstring>
#include <cassert>
#include <numeric>
#include <sstream>
#include <complex>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cctype>
#include <unordered_map>
#include <unordered_set>
using namespace std;

#define REP2(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define REP(i, n) REP2(i, 0, n)
#define ALL(S) (S).begin(), (S).end()

template <typename T, typename E>
ostream &operator<<(std::ostream &os, const std::pair<T, E> &p){
  return os << "(" << p.first << ", " << p.second << ")";
}

typedef long long ll;

typedef complex<long double> xy_t;
typedef pair<xy_t, xy_t> line_t;
typedef pair<xy_t, long double> circle_t;
typedef vector<xy_t> poly_t;

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

const long double EPS = 1e-12;

inline bool equal(long double a, long double b){
  return abs(a - b) < EPS;
}

istream &operator>>(istream &is, xy_t &p)   {
  long double x, y;
  is >> x >> y;
  p = xy_t(x, y);
  return is;
}

istream &operator>>(istream &is, line_t &l) {
  return is >> l.first >> l.second;
}

inline long double cross(const xy_t &a, const xy_t &b){
  return imag(conj(a) * b);
}

inline long double dot(const xy_t &a, const xy_t &b){
  return real(conj(a) * b);
}


inline xy_t direction(const line_t &line){
  return line.second - line.first;
}

int ccw(const xy_t &a, xy_t b, xy_t c){
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return 1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c)   < 0) return 2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}

int ccw(const line_t &l, const xy_t &a){
  return ccw(l.first, l.second, a);
}


bool intersectSP(const line_t &s, const xy_t &p) {
  return abs(s.first - p) + abs(s.second - p) - abs(direction(s)) < EPS;
}

bool intersectSS(const line_t &s, const line_t &t) {
  return ccw(s, t.first) * ccw(s, t.second) <= 0 &&
         ccw(t, s.first) * ccw(t, s.second) <= 0;
}

xy_t projection(const line_t &l, const xy_t &p) {
  long double t = dot(p - l.first, direction(l)) / norm(direction(l));
  return l.first + t*(direction(l));
}

long double distanceSP(const line_t &s, const xy_t &p) {
  const xy_t r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.first - p), abs(s.second - p));
}

long double distanceSS(const line_t &s, const line_t &t) {
  if (intersectSS(s, t)) return 0;
  
  return min(min(distanceSP(s, t.first), distanceSP(s, t.second)),
             min(distanceSP(t, s.first), distanceSP(t, s.second)));
}

xy_t crosspoint(const line_t &l, const line_t &m){
  xy_t l_vec = direction(l);
  xy_t m_vec = direction(m);
  long double A = cross(l_vec, m_vec);
  assert(!equal(A, 0));
  return m.first + cross(l_vec, l.second-m.first) / A * m_vec;
}

inline size_t next_index(const poly_t &poly, size_t curr){
  return (curr + 1) % poly.size();
}

inline size_t prev_index(const poly_t &poly, size_t curr){
  return (curr + poly.size() - 1)  % poly.size();
}

poly_t convex_cut(const poly_t &poly, const line_t &line){
  poly_t new_poly;
  
  for (size_t i = 0; i < poly.size(); i++){
    xy_t a = poly[i];
    xy_t b = poly[next_index(poly, i)];

    if (ccw(line, a) != -1) new_poly.push_back(a);
    
    if (ccw(line, a) * ccw(line, b) < 0){
      new_poly.push_back(crosspoint(line_t (a, b), line));
    }
  }
  return new_poly;
}

long double signed_area(const poly_t &poly){
  long double res = 0;
  for (size_t i = 0; i < poly.size(); i++){
    res += cross(poly[i], poly[next_index(poly, i)]);
  }
  return res * 0.5;
}

long double area(const poly_t &poly){
  return abs(signed_area(poly));
}

int main(){
  ios::sync_with_stdio(false);
  int N;

  while (cin >>N && N){
    poly_t poly(N);

    REP(i, N){
      cin >> poly[i];
    }

    long double ub = 1e9;
    long double lb = 0;

    REP(i, 500){
      long double mb = (ub + lb) / 2;
      
      poly_t tmp_poly = poly;
      REP(j, poly.size()){
        line_t line = line_t(poly[j], poly[next_index(poly, j)]);
        xy_t   vec  = direction(line) / abs(direction(line)) *
          polar((long double)1., (long double)M_PI / 2);
        line_t cut_line = line_t(line.first + vec * mb, line.second + vec * mb);
        tmp_poly = convex_cut(tmp_poly, cut_line);
      }

      if (area(tmp_poly) > EPS){
        lb = mb;
      } else {
        ub = mb;
      }
    }
    printf("%.20lf\n", (double)lb);
  }
  
  return 0;
}