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;

typedef complex<long double> P;
typedef pair<P, P> L;

const long double INF = 1e+9;
const long double EPS = 1e-5;

bool equal(long double a, long double b){ return fabs(a-b) < EPS;}
long double dot(P a, P b){ return real(conj(a)*b); }
long double cross(P a, P b){ return imag(conj(a)*b); }
int ccw(P a, P b, P c){
  b -= a;
  c -= a;
  if(cross(b,c) > EPS) return 1;
  if(cross(b,c) < -EPS) return -1;
  if(dot(b,c) < -EPS) return 2;
  if(norm(b) < norm(c)) return -2;
  return 0;
}
P crossPoint(L l, L m){
  long double A = cross(l.second - l.first, m.second - m.first);
  long double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}
vector<P> convex_cut(vector<P> G, L l){
  vector<P> ans;
  for(int i=0;i<G.size();i++){
    P A = G[i];
    P B = G[(i+1)%G.size()];
    if(ccw(l.first, l.second, A) != -1) ans.push_back(A);
    if(ccw(l.first, l.second, A) * ccw(l.first, l.second, B) < 0)
      ans.push_back(crossPoint(L(A,B), l));
  }
  return ans;
}
long double area(vector<P> v){
  long double sum = 0.0;
  int n = v.size();
  for(int i=0;i<n;i++) sum += (real(v[i]) - real(v[(i+1)%n])) * (imag(v[i]) + imag(v[(i+1)%n]));
  return fabs(sum) / 2;
};
bool equal(P a, P b){
  return equal(a.real(), b.real()) && equal(a.imag(), b.imag());
}


int n;
vector<P> v;

long double binary_search(bool is_h){
  L l;
  long double le = -INF, ri = INF, mid;
  vector<P> cut_v;

  while(ri - le > EPS/1000.0){
    mid = (ri + le) / 2.0;
    if(is_h) l = L(P(-INF, mid), P(INF, mid));
    else l = L(P(mid, INF), P(mid, -INF));
    cut_v = convex_cut(v, l);
    if(area(v) > area(cut_v) * 2.0) ri = mid;
    else le = mid;
  }

  return (ri + le) / 2.0;
}

P solve(){
  P res = P(binary_search(false), binary_search(true));
  bool f = true;

  if(n % 2 == 1) f = false;
  else {
    for(int i=0;i<n/2;i++){
      if(!equal(v[i] - res, res - v[i+n/2])){
        f = false;
        break;
      }
    }
  }

  if(f) return res;
  else return P(INF, INF);
}

int main(){
  long double x, y;
  while(cin >> n){
    v.clear();
    for(int i=0;i<n;i++){
      cin >> x >> y;
      v.push_back(P(x, y));
    }
    P res = solve();
    if(equal(res, P(INF, INF))) cout << "NA" << endl;
    else printf("%.6Lf %.6Lf\n",res.real(),res.imag());
  }
}