#include <iostream>
#include <complex>
#include <sstream>
#include <cassert>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const double EPS = 1e-12;
const double INF = 1e12;
#define X real()
#define Y imag()
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
#define diff(P, i) (next(P, i) - curr(P, i))
#define EQ(a,b) (abs((a)-(b)) < EPS)
namespace std {
  bool operator < (const P& a, const P& b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}

struct L : public vector<P> {
  L(const P &a, const P &b) {
    push_back(a); push_back(b);
  }
};

typedef vector<P> G;

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

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

int ccw(P a, P b, P c) {
  b -= a; c -= a;
  if (cross(b, c) > 0)   return +1;       // counter clockwise
  if (cross(b, c) < 0)   return -1;       // clockwise
  if (dot(b, c) < 0)     return +2;       // c--a--b on line
  if (norm(b) < norm(c)) return -2;       // a--b--c on line
  return 0;
}

bool intersectLL(const L &l, const L &m) {
  return abs(cross(l[1]-l[0], m[1]-m[0])) > EPS || // non-parallel
    abs(cross(l[1]-l[0], m[0]-l[0])) < EPS;   // same line
}

P crosspointLL(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0]; // same line
  if (abs(A) < EPS) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
  return m[0] + B / A * (m[1] - m[0]);
}

G convex_cut(const G &g, const L &l){
  G Q;
  REP(i, g.size()){
    P A = curr(g, i), B = next(g, i);
    if(ccw(l[0], l[1], A) != -1) Q.push_back(A);
    if(ccw(l[0], l[1], A) * ccw(l[0], l[1], B) < 0){
      P c = crosspointLL(L(A, B), l);
      if(!EQ(A, c) && !EQ(B, c)) Q.push_back(crosspointLL(L(A, B), l));
    }
  }
  return Q;
}

P crosspointGL(const G &g, const L &l){
  REP(i, g.size()){
    L a = L(curr(g, i), next(g, i));
    if(intersectLL(a, l)) return crosspointLL(a, l);
  }
  return P(-1, -1);
}

double area2(const G &P) {
  double A = 0.0;
  for (int i = 0; i < P.size(); ++i)
    A += cross(curr(P, i), next(P, i));
  return A / 2.0;
}

int main() {
  int t = 0;
  while(true){
    P ps[3];
    REP(i, 3){
      double x, y; cin >>x >>y;
      ps[i] = P(x, y);
    }
    if(ps[0].Y == 0) break;
    G g;
    g.push_back(P(0, 0));
    g.push_back(P(10000, 0));
    g.push_back(P(10000, 10000));
    g.push_back(P(0, 10000));
    FOR(i, 1, 3){
      P m = (ps[0] + ps[i]) / 2.0, mm = ((ps[0] - ps[i]) / abs(ps[0] - ps[i]) * P(0, 1) * 10.0) + m;
      if(ccw(mm, m, ps[0]) == 1) g = convex_cut(g, L(mm, m));
      else g = convex_cut(g, L(m, mm));
    }
    printf("%d %.5lf\n", ++t, area2(g) / (10000.0 * 10000.0));
  }

  return 0;
}

Measured memory_bytes: 1260