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;
long double eps = 1e-10;
class dsu {
 public:
  vector<int> sets;
  void init(int n) {
    sets.resize(n);
    for (int i = 0; i < n; i++) sets[i] = -1;
  }
  int find_set(int x) {
    if (sets[x] < 0) return x;
    return sets[x] = find_set(sets[x]);
  }
  int union_sets(int x, int y) {
    int r[] = {find_set(x), find_set(y)};
    if (r[0] == r[1]) return -1;
    int l = (sets[r[0]] < sets[r[1]]) ? 0 : 1;
    sets[r[l]] += sets[r[l ^ 1]];
    sets[r[l ^ 1]] = r[l];
    return -sets[r[l]];
  }
};
const long double EPS = 1e-13;
const long double INF = 1e18;
struct PT3D {
  long double x, y, z;
  PT3D() {}
  PT3D(long double x, long double y, long double z) : x(x), y(y), z(z) {}
  PT3D(const PT3D &p) : x(p.x), y(p.y), z(p.z) {}
  PT3D operator+(const PT3D &p) const {
    return PT3D(x + p.x, y + p.y, z + p.z);
  }
  PT3D operator-(const PT3D &p) const {
    return PT3D(x - p.x, y - p.y, z - p.z);
  }
  PT3D operator*(long double c) const { return PT3D(x * c, y * c, z * c); }
  PT3D operator/(long double c) const { return PT3D(x / c, y / c, z / c); }
  bool operator<(const PT3D &rhs) const {
    return make_pair(y, x) < make_pair(rhs.y, rhs.x);
  }
  bool operator==(const PT3D &rhs) const {
    return make_pair(y, x) == make_pair(rhs.y, rhs.x);
  }
};
long double dot(PT3D p, PT3D q) { return p.x * q.x + p.y * q.y + p.z * q.z; }
long double dist2(PT3D p, PT3D q) {
  PT3D d = p - q;
  return dot(d, d);
}
int dcmp(long double a) {
  if (fabs(a) < EPS) return 0;
  return a < 0 ? -1 : 1;
}
bool LUPDecompose(vector<vector<long double> > &A, vector<int> &P) {
  int i, j, k, imax;
  long double maxA, absA;
  int n = A.size();
  P.resize(n + 1);
  for (i = 0; i <= n; i++) P[i] = i;
  for (i = 0; i < n; i++) {
    maxA = 0.0;
    imax = i;
    for (k = i; k < n; k++)
      if ((absA = abs(A[k][i])) > maxA) {
        maxA = absA;
        imax = k;
      }
    if (maxA < eps) return false;
    if (imax != i) {
      swap(P[i], P[imax]);
      swap(A[i], A[imax]);
      P[n]++;
    }
    for (j = i + 1; j < n; j++) {
      A[j][i] /= A[i][i];
      for (k = i + 1; k < n; k++) A[j][k] -= A[j][i] * A[i][k];
    }
  }
  return true;
}
vector<long double> LUPSolve(vector<vector<long double> > &A, vector<int> &P,
                             vector<long double> B) {
  vector<long double> ans;
  int n = A.size();
  ans.resize(n);
  for (int i = 0; i < n; i++) {
    ans[i] = B[P[i]];
    for (int k = 0; k < i; k++) ans[i] -= A[i][k] * ans[k];
  }
  for (int i = n - 1; i >= 0; i--) {
    for (int k = i + 1; k < n; k++) ans[i] -= A[i][k] * ans[k];
    ans[i] = ans[i] / A[i][i];
  }
  return ans;
}
vector<vector<long double> > LUPInvert(vector<vector<long double> > &A,
                                       vector<int> &P) {
  vector<vector<long double> > ans;
  int n = A.size();
  ans.resize(n);
  for (int i = 0; i < n; i++) ans[i].resize(n);
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < n; i++) {
      if (P[i] == j)
        ans[i][j] = 1.0;
      else
        ans[i][j] = 0.0;
      for (int k = 0; k < i; k++) ans[i][j] -= A[i][k] * ans[k][j];
    }
    for (int i = n - 1; i >= 0; i--) {
      for (int k = i + 1; k < n; k++) ans[i][j] -= A[i][k] * ans[k][j];
      ans[i][j] = ans[i][j] / A[i][i];
    }
  }
  return ans;
}
long double LUPDeterminant(vector<vector<long double> > &A, vector<int> &P) {
  int n = A.size();
  long double det = A[0][0];
  for (int i = 1; i < n; i++) det *= A[i][i];
  if ((P[n] - n) % 2 == 0)
    return det;
  else
    return -det;
}
vector<long double> tovec(const PT3D &u) {
  vector<long double> v;
  v.push_back(u.x);
  v.push_back(u.y);
  v.push_back(u.z);
  return v;
}
long double sphere(const PT3D &a, const PT3D &b, const PT3D &c, const PT3D &d,
                   PT3D &cen) {
  vector<vector<long double> > A;
  A.push_back(tovec(a - b));
  A.push_back(tovec(b - c));
  A.push_back(tovec(c - d));
  vector<int> P;
  if (LUPDecompose(A, P)) {
    vector<long double> B;
    long double ad = dot(a, a), bd = dot(b, b), cd = dot(c, c), dd = dot(d, d);
    B.push_back((ad, -bd) / 2.0);
    B.push_back((bd - cd) / 2.0);
    B.push_back((cd - dd) / 2.0);
    vector<long double> x = LUPSolve(A, P, B);
    cen.x = x[0];
    cen.y = x[1];
    cen.z = x[2];
    long double r = dist2(cen, a);
    r = sqrt(r);
    return r;
  }
  return -1;
}
int main() {
  int n;
  long long x, y, z;
  vector<PT3D> p;
  PT3D ans(0, 0, 0);
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld%lld", &x, &y, &z);
    PT3D u(x, y, z);
    p.push_back(u);
    ans = ans + u;
  }
  ans = ans / (long double)n;
  long double lr = 0.1;
  for (int it = 0; it < 100000 && lr > EPS; it++) {
    int j = 0;
    long double d = 0, cd;
    for (int i = 0; i < n; i++) {
      cd = dist2(ans, p[i]);
      if (d < cd) {
        j = i;
        d = cd;
      }
    }
    ans = ans * (1 - lr) + p[j] * lr;
    lr *= 0.995;
  }
  double x0 = ans.x;
  double y0 = ans.y;
  double z0 = ans.z;
  printf("%.12f %.12f %.12f\n", x0, y0, z0);
  return 0;
}