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 <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
#include <complex>
#define X real()
#define Y imag()
typedef complex<double> P;
typedef pair<P, P> Line;
bool eq(double x, double y){
  if(abs(x - y) < EPS) return true;
  else return false;
}
bool eq(P a, P b){
  if(eq(a.X, b.X) && eq(a.Y, b.Y)) return true;
  else return false;
}
bool isok(vector<Line> L){
  int N = L.size();
  if(N % 2 != 0) return false;
  for(int i = 0; i < N / 2; i++){
    if(!eq(L[i].second - L[i].first, L[i + N/2].first - L[i + N/2].second)) return false;
  }
  return true;
}
int main(){
  int N;
  while(cin>>N){
    vector<P> points;
    REP(i, N){
      double x, y;
      cin>>x>>y;
      points.push_back(P(x, y));
    }
    vector<Line> lines;
    REP(i, N) lines.push_back(Line(points[i], points[(i + 1) % N]));
    if(isok(lines)){
      double ansX, ansY;
      ansX = (points[0].X + points[0 + N/2].X)/2;
      ansY = (points[0].Y + points[0 + N/2].Y)/2;
      printf("%.5lf %.5lf\n", ansX, ansY);
    }else{
      cout<<"NA"<<endl;
    }
  }
  return 0;
}