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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100;
const int CNT = 60;
const double LINF = 1e60;
double xs[MAX_N], ys[MAX_N], zs[MAX_N];
double minx, maxx, miny, maxy, minz, maxz;
inline void setmin(double &a, double b) {
  if (a > b) a = b;
}
inline void setmax(double &a, double b) {
  if (a < b) a = b;
}
double d2max(int n, double x, double y, double z) {
  double maxd2 = 0.0;
  for (int i = 0; i < n; i++) {
    double dx = x - xs[i], dy = y - ys[i], dz = z - zs[i];
    setmax(maxd2, dx * dx + dy * dy + dz * dz);
  }
  return maxd2;
}
double calcz(int n, double x, double y, double &z) {
  double lz = minz, rz = maxz;
  for (int cnt = 0; cnt < CNT; cnt++) {
    double z0 = (lz * 2 + rz) / 3;
    double z1 = (lz + rz * 2) / 3;
    if (d2max(n, x, y, z0) >= d2max(n, x, y, z1))
      lz = z0;
    else
      rz = z1;
  }
  z = lz;
  return d2max(n, x, y, z);
}
double calcyz(int n, double x, double &y, double &z) {
  double ly = miny, ry = maxy;
  for (int cnt = 0; cnt < CNT; cnt++) {
    double y0 = (ly * 2 + ry) / 3;
    double y1 = (ly + ry * 2) / 3;
    if (calcz(n, x, y0, z) >= calcz(n, x, y1, z))
      ly = y0;
    else
      ry = y1;
  }
  y = ly;
  return calcz(n, x, y, z);
}
double calcxyz(int n, double &x, double &y, double &z) {
  double lx = minx, rx = maxx;
  for (int cnt = 0; cnt < CNT; cnt++) {
    double x0 = (lx * 2 + rx) / 3;
    double x1 = (lx + rx * 2) / 3;
    if (calcyz(n, x0, y, z) >= calcyz(n, x1, y, z))
      lx = x0;
    else
      rx = x1;
  }
  x = lx;
  return calcyz(n, x, y, z);
}
int main() {
  int n;
  scanf("%d", &n);
  minx = miny = minz = LINF;
  maxx = maxy = maxz = -LINF;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf", xs + i, ys + i, zs + i);
    setmin(minx, xs[i]);
    setmax(maxx, xs[i]);
    setmin(miny, ys[i]);
    setmax(maxy, ys[i]);
    setmin(minz, zs[i]);
    setmax(maxz, zs[i]);
  }
  double bx, by, bz;
  calcxyz(n, bx, by, bz);
  printf("%.8lf %.8lf %.8lf\n", bx, by, bz);
  return 0;
}