/*
 * Faculty of Applied Science and Engineering, University of Toronto
 * CSC181: Introduction to Computer Programming, Fall 2000
 *
 * Assignment 1 Solution (Task 2)
 * Author: Ray Ortigas (rayo@dgp.toronto.edu)
 */

#include <stdio.h>
#include <stdlib.h>

/* Represents a square. */
typedef struct {
	/* The x-coordinate of this square. */
	double x;

	/* The y-coordinate of this square. */
	double y;

	/* The side length of this square. */
	double s;
} Square;

/* Represents a rectangle. */
typedef struct {
	/* The x-coordinate of this rectangle. */
	double x;

	/* The y-coordinate of this rectangle. */
	double y;

	/* The width of this rectangle. */
	double w;

	/* The height of this rectangle. */
	double h;
} Rectangle;

/* Creates and returns the square whose coordinates and side-length are
   taken from the standard input. */
Square readSquare() {
	Square result;
	scanf("%lf %lf %lf", &(result.x), &(result.y), &(result.s));
	return result;
}

/* Returns the rectangle which bounds r and s. */
Rectangle addSquareToRectangle(const Rectangle r, const Square s) {
	Rectangle result;

	/* Calculate the right, left, top and bottom of r. */
	double rr = r.x + r.w/2.0;
	double lr = r.x - r.w/2.0;
	double tr = r.y + r.h/2.0;
	double br = r.y - r.h/2.0;

	/* Calculate the right, left, top and bottom of s. */
	double rs = s.x + s.s/2.0;
	double ls = s.x - s.s/2.0;
	double ts = s.y + s.s/2.0;
	double bs = s.y - s.s/2.0;

	/* Calculate the bounding rectangle of r and s. */
	result.x = (max(rr, rs) + min(lr, ls))/2.0;
	result.y = (max(tr, ts) + min(br, bs))/2.0;
	result.w = max(rr, rs) - min(lr, ls);
	result.h = max(tr, ts) - min(br, bs);

	return result;
}

/* Main program. */
int main(void) {

	/* The bounding rectangle. */
	Rectangle r;

	/* The number of squares. */
	int n;

	/* Initialize the bounding rectangle to a zero-sized rectangle
	   centred at (0,0). */
	r.x = 0;
	r.y = 0;
	r.w = 0;
	r.h = 0;

	/* Read in the squares, but not before reading in how many squares
	   the are. */
	scanf("%d", &n);
	if (n > 0) {

		/* Temporary counter for reading in squares. */
		int i;

		/* Read in the initial square, and set the bounding rectangle to
		   that. */
		Square s = readSquare();
		r.x = s.x;
		r.y = s.y;
		r.w = s.s;
		r.h = s.s;

		/* Read in the rest of the squares, and adjust the bounding
		   rectangle as necessary. */
		for (i = 1; i < n; i++) {
			r = addSquareToRectangle(r, readSquare());
		}
	}

	/* Print out the bounding rectangle. */
	printf("%.2lf %.2lf %.2lf %.2lf\n", r.x, r.y, r.w, r.h);

	return 0;
}
