#include<bits/stdc++.h>
using namespace std;
typedef pair<double,int>P;
typedef pair<double,double>Pi;
typedef pair<Pi,int>PP;
int main(){
  int n,T=0;
  while(cin>>n,n){
    cout<<++T<<" ";
    double a[101],b[101],c[101];
    vector<P> v;
    for(int i=0;i<n;i++){
      cin>>a[i]>>b[i]>>c[i];
      v.push_back(P(b[i]-c[i],i));
      v.push_back(P(b[i]+c[i],i));
    }

    sort(v.begin(),v.end());
    double h=-1e9,w=0;
    double ans=0;
    vector<PP> s;
    for(int i=0;i<v.size();i++){
      bool f=1;
      ans+=(v[i].first-h)*w,h=v[i].first;
      for(int j=0;j<s.size();j++)
	if(s[j].second==v[i].second)s.erase(s.begin()+j),f=0;
 
      if(f)s.push_back(PP(Pi(a[v[i].second]-c[v[i].second],a[v[i].second]+c[v[i].second]),v[i].second));
 
      sort(s.begin(),s.end());
      w=0;
      if(s.size()){
	w=s[0].first.second-s[0].first.first;
	double pr=s[0].first.second;
	
	
	for(int j=0;j<s.size();j++){
	  if(s[j].first.first<pr)w+=max(0.0,s[j].first.second-pr);
	  else w+=s[j].first.second-s[j].first.first;
	  pr=max(s[j].first.second,pr);
	}
      }
    }
    printf("%.2f\n",ans);
  }
  return 0;
}