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;
 
 
#define EPS (1e-10)
#define equal(a,b) (fabs((a)-(b)) < EPS)
 
class Point {
  public:
 
  double x,y;
   
  Point (double x = 0, double y = 0) : x(x),y(y) {}
  
  Point operator + (Point p) {
    return Point( x+p.x , y+p.y );
  }
  Point operator - (Point p) {
    return Point( x-p.x , y-p.y );
  }
  Point operator * (double a) {
    return Point( a*x , a*y );
  }
  
  double abs() {
    return sqrt(norm());
  }
  double norm() {
    return x*x+y*y;
  }
  
  bool operator < (const Point &p) const {
    return x != p.x ? x < p.x : y < p.y;
  }
  
  bool operator == (const Point &p) const {
    return equal( x,p.x )&& equal( y,p.y );
  }
};
 
typedef Point Vector;
  
double dot(Vector a,Vector b) {
  return a.x*b.x + a.y*b.y;
}
  
double cross(Vector a,Vector b) {
  return a.x*b.y - b.x*a.y;
}
 
Vector rotation(Vector vec,double si,double co){
  Vector res;
  res.x = vec.x*co - vec.y*si;
  res.y = vec.x*si + vec.y*co;
  return res;
}
 
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
  
int ccw( Point p0 , Point p1 , Point p2 ) {
  Vector a = p1 - p0;
  Vector b = p2 - p0;
  if( cross(a,b) > EPS ) return COUNTER_CLOCKWISE;
  if( cross(a,b) < -EPS ) return CLOCKWISE;
  if( dot(a,b) < -EPS ) return ONLINE_BACK;
  if( a.norm() < b.norm() ) return ONLINE_FRONT;
  return ON_SEGMENT;
}
 
class Segment{
    public:
    Point p1, p2;
    Segment(Point s = Point(), Point t = Point()): p1(s), p2(t){}
};
typedef Segment Line;
 
Point getCrossPointLL(Line l1,Line l2){
  Point p1=l1.p1,p2=l1.p2;
  Point q1=l2.p1,q2=l2.p2;
  Point res;
  res= p1+(p2-p1)*( cross(q2-q1,q1-p1)/cross(q2-q1,p2-p1) );
  return res;
}
 
vector<Point> cutC(vector<Point> t,Line li){
  int n=t.size();
  vector<Point> u;
  int A[200];
  
  for(int i=0;i<n;i++)A[i]=ccw(li.p1,li.p2,t[i]);
  
  for(int i=0;i<n;i++){
    if(A[i]!=CLOCKWISE)u.push_back(t[i]);
    int j=(i+1)%n;
    if(A[i]==COUNTER_CLOCKWISE
       &&A[j]==CLOCKWISE)
      u.push_back( getCrossPointLL(Line(t[i],t[j]),li));
    else if(A[j]==COUNTER_CLOCKWISE
            &&A[i]==CLOCKWISE)
      u.push_back( getCrossPointLL(Line(t[i],t[j]),li));
  }
   
  return u;
}
 
 
int n,m;
double d,V;
vector<Point> G,G2;
vector< Segment > g;

bool check(double M){
  G2 = G;
  for(int i=0;i<n;i++){
    Segment s=g[i];
    Vector v = rotation(s.p2-s.p1,1.0,0.0);
    double k=v.abs();
    v = v*(1.0/k);
    v = v*M;
    s.p1 = s.p1 + v;
    s.p2 = s.p2 + v;
    G2 = cutC(G2,s);
    if(G2.size()<3)return false;
  }
  return true;
}

int main(){
  while(1){
    cin>>n;
    if(n==0)break;
    G.resize(n);
    for(int i=0;i<n;i++)cin>>G[i].x>>G[i].y;
    g.resize(n);
    for(int i=0;i<n;i++)g[i]=(Segment){ G[i] , G[(i+1)%n] };
    
    double L=0.0,R=1e5,M;
    for(int i=0;i<100;i++){
      M=(L+R)/2.0;
      if(check(M))L=M;
      else R=M;
    }
    printf("%.8f\n",L);
  }
  return 0;
}