// 2000/07/31

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <list>

using namespace std;

//------------------------------------
// 点をあらわすクラス
struct TPoint {
  
  double x,y;

  TPoint() : x(0), y(0) {}
  TPoint( const double x_, const double y_ ) : x(x_), y(y_) {}

  void set( const double x_, const double y_ ) { x=x_; y=y_; }
  
  friend istream & operator >> ( istream &is, TPoint &p ) {
    
    is >> p.x >> p.y;
    
    return is;
  }
  
  friend ostream & operator << ( ostream &os, const TPoint &p ) {

    os << "(" << p.x << "," << p.y << ")";
    return os;
  }
};

//---------------------------------------------
// p3がp1,p2の範囲内かの判定
bool isRange( const double p1, const double p2, const double p3 ) {
  if ( min(p1,p2) <= p3 && p3 <= max(p1,p2) )
    return true;    // 範囲内
  else
    return false;   // 範囲外
}

bool isRange( const TPoint p1, const TPoint p2, const TPoint p3 ) {
  
  if ( isRange(p1.x,p2.x,p3.x) && isRange(p1.y,p2.y,p3.y) )
    return true;
  else
    return false;
}
//---------------------------------------------
// 直線と線分の交点を求める p1,p2が線分 p3,p4が直線
int crossPoint( TPoint &ap1, // 交点
   const TPoint &p1, const TPoint &p2, const TPoint &p3, const TPoint &p4
		) {

  double a1,a2, b1,b2;

  a1 = ( p1.y - p2.y );
  a2 = ( p3.y - p4.y );
  b1 = ( p2.x - p1.x );
  b2 = ( p4.x - p3.x );

  if ( a1*b2 - a2*b1 == 0 ) {
	 
    return 0; // 平行よって交わりなし
  }

  double c1, c2;

  c1 = p1.x * p2.y - p2.x * p1.y;
  c2 = p3.x * p4.y - p4.x * p3.y;

  ap1.x = (b1*c2-b2*c1) / (a1*b2 - a2*b1);
  ap1.y = (a1*c2-a2*c1) / (a2*b1 - a1*b2);

  if ( isRange( p1 , p2, ap1) )
    return 1;
  else
    return 0;
}
//------------------------------------
TPoint g_IC, g_PC, g_ACM;

//------------------------------------
// 距離を求める(ただし簡略化されている)
inline
double dist( const TPoint p1, const TPoint p2) {

  const double dx = p1.x - p2.x;
  const double dy = p1.y - p2.y;

  return dx*dx+dy*dy;
}
//------------------------------------
void calc() {

  list<TPoint> poly;
  list<TPoint>::iterator ii,jj;

  // 開始の4角形を登録
  poly.push_back( TPoint(0,0) );
  poly.push_back( TPoint(10000,0) );
  poly.push_back( TPoint(10000,10000) );
  poly.push_back( TPoint(0,10000) );

  //
  for( int turn = 0; turn < 2; turn++ ) {

    TPoint now;

    // 注目する点を登録する
    if ( turn == 0 )      now = g_PC;
    else if ( turn == 1 ) now = g_ACM;

    // 2つの点の間を通る直線を求める
    TPoint p1, p2;
    
    p1.x = (g_IC.x+now.x) / 2;  p1.y = (g_IC.y+now.y) / 2;
    
    double dx = g_IC.x - now.x;
    double dy = g_IC.y - now.y;

    if ( dy != 0 ) {

      double kata = -dx/dy;
      p2 = p1;  p2.x += 1000; p2.y += 1000*kata;
    }
    else {
      
      p2 = p1; p2.y += 1000;
    }

    // 新しい多角形を構成する
    list<TPoint> new_poly;

    for( ii = poly.begin(); ii != poly.end(); ii++ ) {
      
      // 注目する2つの頂点を設定
      jj = ii;  advance( jj, 1 );
      if ( jj == poly.end() ) jj = poly.begin();

      // 頂点が求める多角形に含まれるかどうかを調べる
      if ( dist( *ii, g_IC ) <= dist( *ii, now ) ) {

	new_poly.push_back( *ii );
      }

      // 交わりを求める
      TPoint c1;

      if ( crossPoint( c1, *ii, *jj, p1, p2 ) ) {

	// 交わりありなので、追加
	new_poly.push_back(c1);
      }
    }

    // 更新
    poly = new_poly;
  }

  // 求めた多角形の面積を計算する
  double sum = 0;

  for( ii = poly.begin(); ii != poly.end(); ii++ ) {
    
    jj = ii; advance(jj,1);
    if ( jj == poly.end() ) jj = poly.begin();

    sum += ii->x*jj->y - jj->x*ii->y;
  }

  sum /= 2;
    
  // 答えを出力
  static int count = 1;

  cout << count++ << " ";

  char buf[100];
  sprintf(buf, "%.5lf", sum / (10000*10000.0) );
  cout << buf << endl;
}
//------------------------------------
int main() {
  
  while(true) {
    
    cin >> g_IC >> g_PC >> g_ACM;

    if ( g_IC.x == 0 && g_IC.y == 0 && g_PC.x == 0 && g_PC.y == 0 &&
	 g_ACM.x == 0 && g_ACM.y == 0 )
      break;

    calc();
  }
}