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 double eps = 1e-9;
inline bool lt(double a, double b) { return a + eps < b; }
inline bool gt(double a, double b) { return lt(b, a); }
inline bool eq(double a, double b) { return !lt(a, b) && !gt(a, b); }
inline bool lte(double a, double b) { return !gt(a, b); }
inline double sq(double x) { return x * x; }
struct Pt {
  double x, y, z;
  void read() { scanf("%lf%lf%lf", &x, &y, &z); }
  void output() {
    cout << "x _ y _ z"
         << " = " << x << " _ " << y << " _ " << z << endl;
  }
};
inline Pt operator+(const Pt &a, const Pt &b) {
  return {a.x + b.x, a.y + b.y, a.z + b.z};
}
inline Pt operator-(const Pt &a, const Pt &b) {
  return {a.x - b.x, a.y - b.y, a.z - b.z};
}
inline Pt operator*(double d, const Pt &p) {
  return {d * p.x, d * p.y, d * p.z};
}
inline bool operator==(Pt a, Pt b) {
  return eq(a.x, b.x) && eq(a.y, b.y) && eq(a.z, b.z);
}
inline double dist(const Pt &a, const Pt &b) {
  double ret = 0;
  ret += sq(a.x - b.x);
  ret += sq(a.y - b.y);
  ret += sq(a.z - b.z);
  return sqrt(ret);
}
inline double norm(const Pt &p) { return dist({0.0, 0.0, 0.0}, p); }
inline Pt cross(const Pt &a, const Pt &b) {
  Pt ret;
  ret.x = a.y * b.z - a.z * b.y;
  ret.y = -(a.x * b.z - b.x * a.z);
  ret.z = a.x * b.y - a.y * b.x;
  return ret;
}
inline double dot(const Pt &a, const Pt &b) {
  return a.x * b.x + a.y * b.y + a.z * b.z;
}
struct Line {
  Pt p, v;
};
inline bool intersection(const Line &a, const Line &b, Pt &c) {
  Pt kl = cross({a.v.x, -b.v.x, a.p.x - b.p.x}, {a.v.y, -b.v.y, a.p.y - b.p.y});
  if (eq(kl.z, 0)) return false;
  double k = kl.x / kl.z;
  double l = kl.y / kl.z;
  if (!(a.p + k * a.v == b.p + l * b.v)) return false;
  c = a.p + k * a.v;
  return true;
}
inline Pt normal(const Pt &a, const Pt &b, const Pt &c) {
  return cross(b - a, c - a);
}
inline Pt center2(const Pt &a, const Pt &b) { return 0.5 * (a + b); }
inline bool center3(const Pt &a, const Pt &b, const Pt &c, Pt &cc) {
  Pt n = normal(a, b, c);
  Line l1 = {0.5 * (a + b), cross(n, b - a)};
  Line l2 = {0.5 * (a + c), cross(n, c - a)};
  return intersection(l1, l2, cc);
}
inline bool center4(const Pt &a, const Pt &b, const Pt &c, const Pt &d,
                    Pt &cc) {
  Pt c1;
  center3(a, b, c, c1);
  Pt c2;
  center3(b, c, d, c2);
  Line l1 = {c1, normal(a, b, c)};
  Line l2 = {c2, normal(b, c, d)};
  return intersection(l1, l2, cc);
}
const int MAXN = 105;
int n;
Pt p[MAXN];
inline bool check(const Pt &c, double r) {
  bool ok = true;
  for (int i = (0); i < (n); ++i) {
    if (gt(dist(c, p[i]), r)) {
      ok = false;
      break;
    }
  }
  return ok;
}
int main(void) {
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) p[i].read();
  if (n == 1) {
    printf("%.10lf %.10lf %.10lf\n", p[0].x, p[0].y, p[0].z);
    exit(0);
  }
  Pt sol_c = {1, 1, 1};
  double sol = 1e100;
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (i); ++j) {
      Pt c = center2(p[i], p[j]);
      double r = dist(c, p[i]);
      if (lt(r, sol)) {
        if (check(c, r)) {
          sol = r;
          sol_c = c;
        }
      }
    }
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (i); ++j)
      for (int k = (0); k < (j); ++k) {
        Pt c;
        if (center3(p[i], p[j], p[k], c)) {
          double r = dist(p[i], c);
          if (lt(r, sol)) {
            if (check(c, r)) {
              sol = r;
              sol_c = c;
            }
          }
        }
      }
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (i); ++j)
      for (int k = (0); k < (j); ++k)
        for (int l = (0); l < (k); ++l) {
          Pt c;
          if (center4(p[i], p[j], p[k], p[l], c)) {
            double r = dist(p[i], c);
            if (lt(r, sol)) {
              if (check(c, r)) {
                sol = r;
                sol_c = c;
              }
            }
          }
        }
  printf("%.10lf %.10lf %.10lf\n", sol_c.x, sol_c.y, sol_c.z);
  return 0;
}