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 long double pi = acosl(-1);
const long double radian = 180 / pi;
const long double eps = 1e-12;
const int inf = 0x7f7f7f7f;
const long long infll = 0x7f7f7f7f7f7f7f7fll;
const long double infl = 1e20;
inline int sgn(const long double &x) { return (x > eps) - (x < -eps); }
inline int sgn(const long long &x) { return (x > 0) - (x < 0); }
inline long double sqr(const long double &x) { return x * x; }
inline long long sqr(const long long &x) { return x * x; }
inline long double refresh(const long double &x) {
  if (x < -1 + eps)
    return -1;
  else if (x > 1 - eps)
    return 1;
  else
    return x;
}
struct Point {
  long double x, y, z;
  Point() : x(0), y(0), z(0) {}
  Point(const long double &x, const long double &y, const long double &z)
      : x(x), y(y), z(z) {}
  long double length() const { return sqrtl(sqr(x) + sqr(y) + sqr(z)); }
  long double length2() const { return sqr(x) + sqr(y) + sqr(z); }
  long double distance(const Point &rhs) const {
    return (rhs - *this).length();
  }
  long double distance2(const Point &rhs) const {
    return (rhs - *this).length2();
  }
  Point moderate() const {
    int xs = sgn(x), ys = sgn(y), zs = sgn(z);
    return *this *
           (zs < 0 || zs == 0 && (ys < 0 || ys == 0 && xs < 0) ? -1 : 1);
  }
  Point vect(const Point &lhs, const Point &rhs) const {
    return (lhs - *this) * (rhs - *this);
  }
  long double scal(const Point &lhs, const Point &rhs) const {
    return (lhs - *this) & (rhs - *this);
  }
  long double distance_to_line(const Point &p, const Point &q) const {
    return fabsl(p.vect(q, *this).length() / p.distance(q));
  }
  long double distance_to_segment(const Point &p, const Point &q) const {
    if (p.scal(q, *this) < 0)
      return p.distance(*this);
    else if (q.scal(p, *this) < 0)
      return q.distance(*this);
    else
      return this->distance_to_line(p, q);
  }
  bool on_line(const Point &p, const Point &q) const {
    return sgn(this->vect(p, q).length2()) == 0;
  }
  bool on_halfline(const Point &p, const Point &q,
                   const bool &inclusive = true) const {
    if (*this == p)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(p.scal(q, *this)) >= 0;
  }
  bool on_segment(const Point &p, const Point &q,
                  const bool &inclusive = true) const {
    if (*this == p || *this == q)
      return inclusive;
    else
      return this->on_line(p, q) && sgn(this->scal(p, q)) <= 0;
  }
  Point operator+(const Point &rhs) const {
    return Point(x + rhs.x, y + rhs.y, z + rhs.z);
  }
  Point operator-(const Point &rhs) const {
    return Point(x - rhs.x, y - rhs.y, z - rhs.z);
  }
  Point operator*(const long double &rhs) const {
    return Point(x * rhs, y * rhs, z * rhs);
  }
  Point operator/(const long double &rhs) const {
    return Point(x / rhs, y / rhs, z / rhs);
  }
  Point operator*(const Point &rhs) const {
    return Point(y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z,
                 x * rhs.y - y * rhs.z);
  }
  long double operator&(const Point &rhs) const {
    return x * rhs.x + y * rhs.y + z * rhs.z;
  }
  long double operator^(const Point &rhs) const {
    return acosl(
        refresh((long double)(*this & rhs) / this->length() / rhs.length()));
  }
  bool operator==(const Point &rhs) const {
    return sgn(x - rhs.x) == 0 && sgn(y - rhs.y) == 0 && sgn(z - rhs.z) == 0;
  }
  bool operator<(const Point &rhs) const {
    if (sgn(z - rhs.z) != 0)
      return z < rhs.z;
    else if (sgn(y - rhs.y) != 0)
      return y < rhs.y;
    else
      return x < rhs.x;
  }
};
inline bool xyzcmp(const Point &lhs, const Point &rhs) {
  if (sgn(lhs.x - rhs.x) != 0)
    return lhs.x < rhs.x;
  else if (sgn(lhs.y - rhs.y) != 0)
    return lhs.y < rhs.y;
  else
    return lhs.z < rhs.z;
}
inline bool zyxcmp(const Point &lhs, const Point &rhs) {
  if (sgn(lhs.z - rhs.z) != 0)
    return lhs.z < rhs.z;
  else if (sgn(lhs.y - rhs.y) != 0)
    return lhs.y < rhs.y;
  else
    return lhs.x < rhs.x;
}
const int maxN = 100;
int N;
Point p[maxN];
Point answer() {
  Point ans;
  const long double rto = 0.999;
  long double zrb = 0.5;
  for (int c = 0; c < 100000; c++) {
    int idx = -1;
    long double mx = 0;
    for (int i = 0; i < N; i++) {
      long double d = ans.distance2(p[i]);
      if (idx == -1 || mx < d) {
        idx = i;
        mx = d;
      }
    }
    ans = ans + (p[idx] - ans) * zrb;
    zrb *= rto;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> N;
  for (int i = 0; i < N; i++) cin >> p[i].x >> p[i].y >> p[i].z;
  Point ans = answer();
  cout << fixed << setprecision(20);
  cout << ans.x << ' ' << ans.y << ' ' << ans.z << endl;
  return 0;
}