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 INF = (int)1E9;
const long long LINF = (long long)4E18;
const long double DINF = (long double)1E100;
const long double PI = acos(-1.0);
const long double EPS = 1E-5;
template <typename T>
T gcd(T a, T b) {
  return (b == 0) ? abs(a) : gcd(b, a % b);
}
template <typename T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
inline T mod(T a, T b) {
  return (a % b + b) % b;
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
template <typename T>
inline string toString(const T &x) {
  ostringstream os;
  os << x;
  return os.str();
}
inline long long toInt(const string &s) {
  istringstream is(s);
  long long x;
  is >> x;
  return x;
}
inline long double toDouble(const string &s) {
  istringstream is(s);
  long double x;
  is >> x;
  return x;
}
inline string toLower(string s) {
  for (typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it)
    *it = tolower(*it);
  return s;
}
inline string toUpper(string s) {
  for (typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it)
    *it = toupper(*it);
  return s;
}
bool LOCAL = false, OUTPUT = true;
const char DEBUG_PARAM[] = "__LOCAL_TESTING";
const char IN[] = "_.in";
const char OUT[] = "_.out";
inline void init();
inline void run();
int ntest = 0, test;
int main(int argc, char *argv[]) {
  if (argc > 1 && strcmp(argv[1], DEBUG_PARAM) == 0) {
    LOCAL = true;
    freopen(IN, "r", stdin);
  }
  init();
  for (test = 1; test <= ntest; test++) {
    run();
  }
  return 0;
}
inline void stop() { ntest = test - 1; }
const int dx[] = {-1, 0, 0, 1};
const int dy[] = {0, -1, 1, 0};
inline void init() {
  OUTPUT = true;
  ntest = 1;
}
const int MAXN = 105;
const int PINF = 1E4;
int n;
double x[MAXN], y[MAXN], z[MAXN];
inline double find(double rx, double ry, double rz) {
  double d = 0;
  for (int i = 0; i < (n); i++) {
    d = max(d, sqr(x[i] - rx) + sqr(y[i] - ry) + sqr(z[i] - rz));
  }
  return d;
}
inline double findZ(double rx, double ry, double &rz) {
  double left = -PINF, right = PINF;
  while (right - left > EPS) {
    double lmid = (2 * left + right) / 3;
    double rmid = (left + 2 * right) / 3;
    if (find(rx, ry, lmid) < find(rx, ry, rmid)) {
      right = rmid;
    } else {
      left = lmid;
    }
  }
  rz = (left + right) / 2;
  return find(rx, ry, rz);
}
inline double findYZ(double rx, double &ry, double &rz) {
  double left = -PINF, right = PINF;
  while (right - left > EPS) {
    double lmid = (2 * left + right) / 3;
    double rmid = (left + 2 * right) / 3;
    double z1, z2;
    if (findZ(rx, lmid, z1) < findZ(rx, rmid, z2)) {
      right = rmid;
    } else {
      left = lmid;
    }
  }
  ry = (left + right) / 2;
  return findZ(rx, ry, rz);
}
inline void run() {
  scanf("%d", &n);
  for (int i = 0; i < (n); i++) {
    scanf("%lf%lf%lf", &x[i], &y[i], &z[i]);
  }
  double rx = 0, ry = 0, rz = 0;
  double left = -PINF, right = PINF;
  while (right - left > EPS) {
    double lmid = (2 * left + right) / 3;
    double rmid = (left + 2 * right) / 3;
    double y1, y2, z1, z2;
    if (findYZ(lmid, y1, z1) < findYZ(rmid, y2, z2)) {
      right = rmid;
    } else {
      left = lmid;
    }
  }
  rx = (left + right) / 2;
  findYZ(rx, ry, rz);
  printf("%.5lf %.5lf %.5lf", rx, ry, rz);
}