There is a flat island whose shape is a perfect square. On this island, there are three habitants whose names are IC, PC, and ACM Every day, one jewel is dropped from the heaven. Just as the jewel touches the ground, IC, PC, and ACM leave their houses simultaneously, run with the same speed, and then a person who first touched the jewel can get the jewel. Hence, the person whose house is nearest to the location of the jewel is the winner of that day.

They always have a quarrel with each other, and therefore their houses are located at distinct places. The locations of their houses are fixed. This jewel falls at a random point on the island, that is, all points on the island have even chance.

When three are two or more persons whose houses are simultaneously nearest, the last person in the order of

IC, PC, ACM

obtains the jewel.

Our interest is to know the probability for IC to get the jewel under this situation.



Input

The input describes one problem instance per line. Each line contains the x- and y-coordinates of IC's home, those of PC's, and those of ACM's in this order. Note that the houses of IC, PC and ACM are located at distinct places. The end of the input is indicated by a line with six zeros.

The coordinates of the whole island are given by (0, 10000) × (0, 10000) and coordinates of houses are given in integer numbers between 1 and 9999, inclusive. It should be noted that the locations of the jewels are arbitrary places on the island and their coordinate values are not necessarily integers.

Output

For each input line, your program should output its sequence number starting from 1, and the probability for the instance. The computed probability values should have errors less than 10-5.

The sequence number and the probability should be printed on the same line. The two numbers should be separated by a space.

Example

Input

2000 2000 8000 8000 9000 9500
2500 2500 7500 2500 2500 7500
0 0 0 0 0 0


Output

1 0.50000
2 0.25000
#include<complex>
#include<vector>
#include<iostream>
#include<stack>
#include<cmath>
#include<algorithm>
#include<iomanip>
#include<cassert>
 
enum CCW{FRONT=0x01,RIGHT=0x02,BACK=0x04,LEFT=0x08,OVER=0x10};
enum CIRCLE_RELATION{CIRCLE_SAME=0x01,CIRCLE_CONTAIN=0x02,
		     CIRCLE_NO_CROSS=0x04,CIRCLE_ONE_CROSS=0x08,
		     CIRCLE_ONE_INSIDE_CROSS=0x10,CIRCLE_TWO_CROSS=0x20};
#define sc second
#define fr first
 
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define foreach(i,o) for(__typeof((o).begin()) i = (o).begin(); i != (o).end(); ++i)
 
using namespace std;
 
typedef double elem;
typedef complex<elem> point, vec;
typedef pair<point, point> line, hline, seg, pp;
 
const elem infty = 1e40;
const elem eps = 1.0e-8;
const elem pi = acos(-1.0);
point base(0,0);
 
// oÍ
ostream &operator<<(ostream &os, const pair<point,point> &p){
  os << p.fr << "-" << p.sc;
  return os;
}
 
// lZ
inline elem sq(elem a){ return a*a; }
inline elem cq(elem a){ return a*a*a; }
 
// pxÏ·
elem rad(elem deg){ return (deg/180)*pi; }
elem deg(elem rad){ return (rad*180)/pi; }

// ®¬_Ìô¢AÈÇ
bool eq(elem a, elem b){ return abs(a-b) < eps; }
bool eqv(vec a, vec b){ return eq( abs(b-a),0); }
  
namespace std{
  bool operator<(const point &a, const point &b){
    if(!eq(a.real(),b.real()))return a.real()<b.real();
    if(!eq(a.imag(),b.imag()))return a.imag()<b.imag();
    return false;
  }
}

// _Iy[^
bool far(point a, point b){ return abs(b-a)>0; }
bool near(point a, point b){ return abs(b-a)<=0; }
elem dot(vec a, vec b){ return (a.real() * b.real() + a.imag() * b.imag() ); }
elem cross(vec a, vec b){ return ( a.real() * b.imag() - a.imag() * b.real() ); }
 
// a©çbÜÅvñèÌpxAàpA]ñ]
elem varg(vec a, vec b){
  elem ret=arg(a)-arg(b);
  if(ret<0)ret+=2*pi;
  if(ret>2*pi)ret-=2*pi;
  if(eq(ret,2*pi))ret=0;
  return ret;
}
elem varg2(vec a, vec b){
  elem ret = varg(a,b);
  if(ret>pi)return 2*pi-ret;
  return ret;
}
elem arg(vec a, vec b){ return acos( dot(a,b) / ( abs(a) * abs(b) ) ); }
point rot(point p, elem theta){ return p * polar((elem)1.0, theta); }
point rotdeg(point p, elem deg){ return p * polar((elem)1.0, rad(deg)); }
point proj(line l, point p){
  elem t=dot(p-l.first,l.first-l.second)/abs(l.first-l.second);
  return l.first + t*(l.first-l.second);
}
point reflect(line l, point p){ return p+2.0*(proj(l,p)-p); }
 
// ñ_Ô£A¼üÆ_ÌÅZ£AüªÆ_ÌÅZ£
elem dist(point a, point b){ return abs(a-b); }
elem dist_l(line l, point x){ return abs(cross(l.sc-l.fr,x-l.fr)) / abs(l.sc-l.fr); }
elem dist_seg(seg s, point x)
{
  if( dot(s.sc-s.fr,x-s.fr)<0 ) return abs(x-s.fr);
  if( dot(s.fr-s.sc,x-s.sc)<0 ) return abs(x-s.sc);
  return dist_l(s,x);
}
 
// PÊxNgA@üxNgAPÊ@üxNg
vec uvec(vec a){ return a / abs(a); }
vec nmr(vec a){ return a * vec(0,-1); }
vec nml(vec a){ return a * vec(0,1); }
vec unmr(vec a){ return uvec( nmr(a) ); }
vec unml(vec a){ return uvec( nml(a) ); }
 
// ¼ðA½s»è
bool orth(point a1, point a2, point b1, point b2){ return eq( dot( a2 - a1, b2 - b1 ), 0 ); }
bool orth(vec v1, vec v2){ return eq( dot(v1, v2), 0 ); }
bool prll(point a1, point a2, point b1, point b2){ return eq( cross( a2 - a1, b2 - b1 ), 0 ); }
bool prll(vec v1, vec v2){ return eq( cross(v1, v2), 0 ); }
 
// CCW oXg¾ªA¸xÉæé
inline int ccw(const point &a, point b, point x){
  b -= a;
  x -= a;
  if( eq(cross(b,x),0.0) && dot(b,x) < 0 ) return BACK;
  if( eq(cross(b,x),0.0) && abs(b) < abs(x) ) return FRONT;
  if( eq(cross(b,x),0.0) ) return OVER;
  if( cross(b,x) > 0 ) return LEFT;
  if( cross(b,x) < 0 ) return RIGHT;
}

// üªg£
line expandLine(line l, elem mag){
  line ret = l;
  vec vf(l.first - l.second);
  vec vs(l.second - l.first);
  ret.first = l.second + mag * uvec(vf);
  ret.second = l.first + mag * uvec(vs);
  return ret;
}
// üªÌð·»è
inline bool intersectedSS(const seg &a, const seg &b)
{
  int cwaf=ccw(a.fr,a.sc,b.fr);
  int cwbf=ccw(b.fr,b.sc,a.fr);
  int cwas=ccw(a.fr,a.sc,b.sc);
  int cwbs=ccw(b.fr,b.sc,a.sc);
  if( cwaf==OVER || cwas==OVER || cwbf==OVER || cwbs==OVER ) return true;
  return ( cwaf | cwas ) == (LEFT|RIGHT) && ( cwbf | cwbs ) == (LEFT|RIGHT);
}
 
// ¼üÌð·»è
bool intersectedLL(line a, line b){ return !eq( cross(a.sc-a.fr,b.sc-b.fr), 0.0 ); }
 
// ð_vZ
point intersectionSS(seg a, seg b)
{
  elem d1 = dist_l(b,a.fr);
  elem d2 = dist_l(b,a.sc);
  return a.fr + ( d1 / (d1 + d2 ) ) * (a.sc-a.fr);
}

point intersectionLL(line a, line b)
{
  vec va = a.sc - a.fr;
  vec vb = b.sc - b.fr;
  return a.fr + va * ( cross(vb, b.fr - a.fr) / cross(vb,va) );
}

bool intersectionLL(line a, line b, point &ret){
  return intersectedLL( a, b ) ? ret = intersectionLL( a, b ), true : false;
}

bool intersectionLS(line l, seg s, point &ret){
  point tmp;
  return intersectionLL(l,s,tmp) ? ( ccw(s.fr,s.sc,tmp)&OVER ? ret=tmp, true : false ) : false;
}

// ÊïJbg(ACC AOJ 1050) -> modified and not verified
bool convexCut(const vector<point> &vp,
	       line l,
	       vector<point> &left)
{
  int n = vp.size();
  bool bFirst = true;
  int indq1 = -1, indq2 = -1;
  point q1, q2;
 
  for(int i = 0; i < n; ++i){
    seg edge = make_pair( vp[i], vp[(i+1)%n] );
    if( bFirst ){
      if( intersectionLS( l, edge, q1 ) ){ bFirst = false; indq1 = (i+1)%n; }
    }else{
      if( intersectionLS( l, edge, q2 ) && far(q1,q2) ){ indq2 = (i+1)%n; break; }
    }
  }
 
  if( indq1<0||indq2<0 ) return false;
  if( eq( dot(uvec(q1-q2),uvec(l.second-l.first)),1) ){ swap( q1, q2 ); swap( indq1, indq2 ); }
  if( far( q2, vp[indq2] ) ) left.push_back( q2 );
  for(int i = indq2; i != indq1; i=(i+1>=n?0:i+1)) left.push_back( vp[i] );
  if( far(q1, vp[(indq1-1+n)%n] ) ) left.push_back( q1 );
 
  return true;
}

// {mC}\zeê_ÉÂ¢ÄÌ{mC¸_ª½vñèÉ^¦çêé(outÖoÍ³êé)
void MakeVolonoi(const vector<point> &vp,
		 const vector<point> &plane,
		 vector< vector<point> > &out){
  vector<point> tplane;
 
  for(int i = 0; i < (int)vp.size(); ++i){
    tplane = plane;
    for(int j = 0; j < (int)vp.size(); ++j){
      if( i != j ){
        vector<point> newplane;
        point c = (vp[i]+vp[j])/2.;
        int cw = ccw( c, unmr(vp[i]-vp[j])+c, vp[i] );
        assert(cw==LEFT||cw==RIGHT);
        line bisec;
        if( cw == LEFT ){
          bisec = line( c, unmr( vp[i]-vp[j] ) + c );
        }else{
          bisec = line( c, unml( vp[i]-vp[j] ) + c );
        }
        //bisec = expandLine( bisec, 100000 ); // magnify segment for convex cut
        if( convexCut(tplane, bisec, newplane ) )
          tplane = newplane;
      }
    }
    out.push_back( tplane );
  }
};

// P½p`Ìàï»è(«EüÜÞ)
bool inSimple(point x, const vector<point> &p)
{
  elem rad = 0;
  int n = p.size();
  for(int i = 0; i < n; ++i){
    int sign = 1;
    int cw = ccw(x,p[i],p[(i+1)%n]);
    int cw2 = ccw( p[i],p[(i+1)%n],x);
    if( near( x,p[i] ) ) return true;
    if( cw2 == OVER ) return true;
    if( cw & OVER ) continue;
    if( cw & RIGHT ) sign = -1;
    rad +=  sign * arg( vec(p[i]-x), vec(p[(i+1)%n]-x) );
  }
  return eq( rad, 2*pi );
}

elem areaOfPolygon(const vector<point> &vp){
  elem ret = 0;
  for(int i = 0; i < (int)vp.size(); ++i){
    ret += cross(vp[i],vp[(i+1)%vp.size()]);
  }
  return abs(ret/2.0);
}

int main()
{
  int tc=1;
  while(true){
    elem x1,y1,x2,y2,x3,y3;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    if(x1==0&&y1==0&&x2==0&&y2==0&&x3==0&&y3==0)break;
    point IC(x1,y1);
    point PC(x2,y2);
    point ACM(x3,y3);
    
    vector<point> plane;
    vector<point> vp;
    vector< vector<point> > vol;
    vp.push_back(IC);
    vp.push_back(PC);
    vp.push_back(ACM);
    plane.push_back(point(0,0));
    plane.push_back(point(10000,0));
    plane.push_back(point(10000,10000));
    plane.push_back(point(0,10000));
    
    double area = 0;
    MakeVolonoi( vp, plane, vol );
    for(int i = 0; i < (int)vol.size(); ++i){
      /*
      for(int j=0;j<(int)vol[i].size();++j){
        cout << vol[i][j] << ' ';
      }
      cout << endl;
      */
      if( inSimple( IC, vol[i] ) ){
        area = areaOfPolygon(vol[i]);
      }
    }
    cout << tc << ' ' << fixed << setprecision(6) << (area/(10000*10000)) << endl;
    ++tc;
  }
  return 0;
}