/*--------------------------------------------------------------*/
/* ACM ICPC 2007-2008                                           */
/* Northeastern European Regional Contest                       */
/* St Petersburg - Barnaul - Tashkent - Batumi, November 28, 200*/
/*--------------------------------------------------------------*/
/* Problem K. Kingdom Partitioning                              */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Georgiy Korneev                        */
/*--------------------------------------------------------------*/
 
import java.io.*;
import java.util.*;

public class kingdom_gk {
    static Scanner in;
    static PrintWriter out;
    static final double EPS = 1e-8;
    static final double MAX_C = 2000;

    class Circle {
        final double x;
        final double y;
        final double r;

        Circle(Scanner in) {
            x = in.nextInt();
            y = in.nextInt();
            r = in.nextInt();
        }

        double left(double x) {
            x = x - this.x;
            if (x < -r + EPS) return 0;
            if (r - EPS < x) return r * r * Math.PI;
            x = x / r;
            return r * r * (Math.PI / 2 + Math.sqrt(1 - x * x) * x + Math.asin(x));
        }
    }

    class Area {
        final List<Circle> circles = new ArrayList<Circle>();
        final double total;
        boolean u;
        double left;
        double right;
        double delta;

        Area(Scanner in) {
            int m = in.nextInt();
            System.out.println(m);

            for (int i = 0; i < m; i++) {
                circles.add(new Circle(in));
            }
            this.total = left(MAX_C);
        }

        double left(double x) {
            double result = 0;
            for (Circle circle : circles) {
                result += circle.left(x);
            }
            return result;
        }

        double part(double x) {
            return left(x) / total;
        }
    }

    void run() {
        int n = in.nextInt();
        Area[] areas = new Area[n];
        for (int i = 0; i < n; i++) {
            areas[i] = new Area(in);
        }

        double left = -MAX_C;
        System.out.println(areas[0].left(0));
        System.out.println(areas[0].left(2));
        for (int i = 0; i < n; i++) {
            for (Area area : areas) {
                if (!area.u) {
                    area.delta = area.part(left);
                }
            }
            double l = left;
            double r = MAX_C;
            Area maxArea = null;
            while (r - l > EPS) {
                double m = (r + l) / 2;
                double max = 0;
                for (Area area : areas) {
                    if (!area.u) {
                        double a = area.part(m) - area.delta;
                        if (max < a) {
                            max = a;
                            maxArea = area;
                        }
                    }
                }
                if (max * n > 1) {
                    r = m;
                } else {
                    l = m;
                }
            }
            maxArea.u = true;
            maxArea.left = left;
            maxArea.right = r;
            left = l;
        }

        for (Area area : areas) {
            out.println(4);
            out.format(
                "%.10f %.10f\n%.10f %.10f\n%.10f %.10f\n%.10f %.10f\n",
                area.left, MAX_C,
                area.left, -MAX_C,
                area.right, -MAX_C,
                area.right, MAX_C
            );
        }
    }

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        in = new Scanner(new File("kingdom.in"));
        out = new PrintWriter("kingdom.out");

        while (in.hasNext()) {
            new kingdom_gk().run();
        }

        out.close();
        in.close();
    }
}
