Problem: The Galaxy contains n planets, there are many different living creatures inhabiting each planet. And each creature can get into troubles! Space rescuers know it perfectly well and they are always ready to help anyone who really needs help. All you need to do is call for them. 

Now the space rescuers plan to build the largest in the history of the Galaxy rescue station; however, the rescue station's location is yet to be determined. As some cases are real emergencies, the rescuers want to find such a point in the Galaxy from which it would be possible to get to the remotest planet in the minimum possible time. In other words, the rescuers need such point in the space that the distance between it and the planet remotest from it was minimal (if we compare this point with all other possible points in the space). Unfortunately, the rescuers can't sole this problem.

As the planets are quite remote from each other, they can be considered as points in Euclidean three-dimensional space. The distance between points (xi, yi, zi) and (xj, yj, zj) can be calculated by the formula <image>. The rescue station can be positioned in any point in the space. It can also coincide with some planet. 

Galaxy is in danger! Save the space rescuers and find the required point for them.

Input

The first line of the input file contains integer n — the number of planets (1 ≤ N ≤ 100). Each of the following n lines contains information about the planets. The i-th line contains three integers xi, yi, zi — the coordinates of the i-th planet ( - 104 ≤ xi, yi, zi ≤ 104, 1 ≤ i ≤ n). No two planets coincide.

Output

Print on the first line of the output file three space-separated real numbers x0, y0, z0 — the coordinates for the future base. If there are several solutions, you are allowed to print any of them. The answer will be accepted if the distance from this point to the remotest planet will differ from the juries' variant in no more than 10 - 6 in absolute or relative value.

Examples

Input

5
5 0 0
-5 0 0
0 3 4
4 -3 0
2 2 -2


Output

0.000 0.000 0.000

Solution (in JAVA):

Solution:
import java.util.*;

public class cf106e {
	static int[] x,y,z;
	static int n,P=50;
	static double bx,by,bz,bd,start=10001;
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		n = in.nextInt();
		bx=by=bz=0;
		bd=1e12;
		x = new int[n];
		y = new int[n];
		z = new int[n];
		for(int i=0; i<n; i++) {
			x[i]=in.nextInt();
			y[i]=in.nextInt();
			z[i]=in.nextInt();
		}
		if(n==1) {
			bx = x[0];
			by = y[0];
			bz = z[0];
		}
		else
			tern1();
		System.out.printf("%.10f %.10f %.10f%n", bx,by,bz);
	}
	static double tern1() {
		double lox = -start;
		double hix = start;
		for(int i=0; i<P; i++) {
			double lt = (2*lox+hix)/3;
			double rt = (2*hix+lox)/3;
			if(tern2(lt) < tern2(rt))
				hix = rt;
			else
				lox = lt;
		}
		return tern2((hix+lox)/2);
	}
	static double tern2(double x) {
		double loy = -start;
		double hiy = start;
		for(int i=0; i<P; i++) {
			double lt = (2*loy+hiy)/3;
			double rt = (2*hiy+loy)/3;
			if(tern3(x,lt) < tern3(x,rt))
				hiy = rt;
			else
				loy = lt;
		}
		return tern3(x,(hiy+loy)/2);
	}
	static double tern3(double x, double y) {
		double loz = -start;
		double hiz = start;
		for(int i=0; i<P; i++) {
			double lt = (2*loz+hiz)/3;
			double rt = (2*hiz+loz)/3;
			if(calc(x,y,lt) < calc(x,y,rt))
				hiz = rt;
			else
				loz = lt;
		}
		return calc(x,y,(loz+hiz)/2);
	}
	static double calc(double xx, double yy, double zz) {
		double d = 0;
		for(int i=0; i<n; i++) 
			d = Math.max(d, (x[i]-xx)*(x[i]-xx)+(y[i]-yy)*(y[i]-yy)+(z[i]-zz)*(z[i]-zz));
		
		if(d < bd) {
			bx = xx;
			by = yy;
			bz = zz;
			bd = d;
		}
		
		return d;
	}
}