Problem: A convex polygon consisting of N vertices is given. The coordinates of each vertex are represented counterclockwise by (X1, Y1), (X2, Y2), ……, (XN, YN). No matter what straight line passes through the point P, find the coordinates of the point P so that the areas of the two convex polygons obtained after cutting are equal.

Constraints

* All inputs are integers

* 3 ≤ N ≤ 50

* 0 ≤ | Xi |, | Yi | ≤ 1000000

* The input polygon is a simple convex polygon.

* The output must satisfy max (| X-cX |, | Y-cY |) ≤ 0.0001 when the output coordinates are (X, Y) and the exact solution is (cX, cY).

Input

The input is given in the following format.

> N
> X1 Y1
> X2 Y2
> ……
> XN YN
>

Output

If there is a point that satisfies the condition of the problem statement, the coordinates of that point

> X Y
>

Output in the format of. If the point does not exist, output "NA" on one line.

Examples

Input

4
100 100
0 100
0 0
100 0


Output

50.00000 50.00000


Input

3
100 100
0 100
0 0


Output

NA

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)

typedef complex<double> P;
typedef vector<P> polygon;

double const eps = 1e-7;

polygon poly;

struct line : public vector<P> {
  line(P const& a, P const& b) {
    push_back(a), push_back(b);
  }
};

double dot(P a, P b) {
  return real(conj(a) * b);
}

double cross(P a, P b) {
  return imag(conj(a) * b);
}

int ccw(P const& p, P a, P b) {
  a -= p, b -= p;
  if(cross(a, b) > eps) return +1;
  if(cross(a, b) < -eps) return -1;
  if(dot(a, b) < -eps) return +2;
  if(norm(a) < norm(b)) return -2;
  return 0;
}

P crosspoint(line const& a, line const& b) {
  auto va = a[1] - a[0], vb = b[1] - b[0];
  double d = cross(vb, va);
  if(abs(d) < eps) return b[0];
  return a[0] + va * cross(vb, b[1] - a[0]) * (1.0 / d);
}

polygon convex_cut(polygon const& g, line const& l) {
  polygon ret;
  int n = g.size();
  rep(i, n) {
    auto curr = g[i % n], next = g[(i + 1) % n];
    if(ccw(l[0], l[1], curr) != -1) ret.push_back(curr);
    if(ccw(l[0], l[1], curr) * ccw(l[0], l[1], next) < 0) {
      ret.push_back(crosspoint(line(curr, next), l));
    }
  }
  return ret;
}

double area(polygon const& g) {
  double ret = 0;
  rep(i, g.size()) {
    ret += cross(g[i], g[(i + 1) % g.size()]);
  }
  return abs(ret) / 2.0;
}

bool ok(P const& p) {
  double ph = area(poly) / 2.0;
  for(double rad = 0.0; rad < 2 * cos(-1); rad += 0.01) {
    line l = line(p, p + polar(1.0, rad));
    auto k = convex_cut(poly, l);
    if(abs((area(k) - ph) / ph) > eps) return false;
  }
  return true;
}

int main() {
  int N; cin >> N;
  P g;
  rep(i, N) {
    double x, y; cin >> x >> y;
    poly.push_back(P(x, y));
    g += P(x, y);
  }
  g /= N;
  if(N % 2 || !ok(g)) cout << "NA" << endl;
  else printf("%.10f %.10f\n", g.real(), g.imag());
  return 0;
}