process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", function (chunk) {
    var input = chunk.trim().split("\n");
    var order = 1;
    while (true) {
        var n = input.shift();
        if (n == 0)
            break;
        var dataset = [];
        var x1 = [];
        var x2 = [];
        var y1 = [];
        var y2 = [];
        var sx = [];
        var sy = [];
        for (var i = 0; i < n; i++) {
            dataset.push(input.shift().split(/\s+/).map(Number));
            x1.push(dataset[i][0] - dataset[i][2]);
            x2.push(dataset[i][0] + dataset[i][2]);
            y1.push(dataset[i][1] - dataset[i][2]);
            y2.push(dataset[i][1] + dataset[i][2]);
            sx.push(dataset[i][0] - dataset[i][2]);
            sx.push(dataset[i][0] + dataset[i][2]);
            sy.push(dataset[i][1] - dataset[i][2]);
            sy.push(dataset[i][1] + dataset[i][2]);
        }
        var area = 0;
        sx.sort(function(a, b){return a-b});
        sy.sort(function(a, b){return a-b});
        for (var a = 0; a < sx.length - 1; a++)
            for (var b = 0; b < sy.length - 1; b++)
                for (var c = flag = 0; c < x1.length; c++) {
                    if ((x1[c] < sx[a + 1]) && (sx[a] < x2[c]) && (y1[c] < sy[b + 1]) && (sy[b] < y2[c]))
                        if (flag == 0) {
                            area += (sx[a + 1] - sx[a]) * (sy[b + 1] - sy[b]);
                            flag++;
                        }
                }
        console.log(order + " " + area.toFixed(2));
        order++;
    }
});