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<cstdio>
#include<cmath>
#include<cassert>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<map>
#include<cstdlib>
#include<sstream>
#define EPS 1e-10
#define F first
#define pb push_back
#define S second
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define equals(a,b) (fabs((a)-(b)) < EPS)

using namespace std;
typedef pair<long double,long double> P;


int N;
/*
cout << setiosflags(ios::fixed) << setprecision(5) << ans.F << " " << ans.S << endl;
*/

class Point{
public:
  long double x,y;

  Point (long double x=0,long double y=0):x(x),y(y){}

  Point operator + (Point p) {return Point(x+p.x,y+p.y); }
  Point operator - (Point p) {return Point(x-p.x,y-p.y); }
  Point operator * (long double p) {return Point(x*p,y*p); } 
  Point operator / (long double p) {return Point(x/p,y/p); }

  bool operator < (const Point &p) const {
    return x!=p.x?x<p.x:y<p.y;
  }

  bool operator == (const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }

};

struct Segment{
  Point p1,p2;
};

long double norm(long double x,long double y){
  return x*x+y*y;
}

long double abs(long double x,long double y){
  return sqrt(norm(x,y));
}

long double dot(Point a,Point b){
  return a.x*b.x+a.y*b.y;
}

long double det(Point a,Point b){
  return a.x*b.y-a.y*b.x;
}



bool isParallel(Segment s1,Segment s2){
  return equals(det(s1.p2-s1.p1,s2.p2-s2.p1),0.0);
}

vector<Point> Pvec;
vector<Segment> Svec;
Point ans;

void makeSvec(){
  rep(i,Pvec.size()){
    Segment s;
    if(i == Pvec.size()-1){
      s.p1 = Pvec[i];
      s.p2 = Pvec[0];
    }else{
    s.p1 = Pvec[i];
    s.p2 = Pvec[i+1];
    }
    Svec.pb(s);
  }
}

void input(){
  ans.x = 0;ans.y = 0;
 cin >> N;  
  rep(i,N){
    Point pos;
    cin >> pos.x >> pos.y;
    ans.x = ans.x+pos.x; ans.y = ans.y+pos.y; 
    Pvec.pb(pos);
  }
  ans.x = ans.x/N;
  ans.y = ans.y/N;
  makeSvec();
}


int main(){
  input();
  if(N%2 != 0){
    cout << "NA" << endl;
    return 0;
  }
  rep(i,N){
    bool fin = false;
    rep(j,N){
      if(i == j)continue;
      if(isParallel(Svec[i],Svec[j]))fin = true;
    }
    if(!fin){
      cout << "NA" << endl;
      return 0;
    }
  }
  cout << setiosflags(ios::fixed) << setprecision(5) << ans.x << " " << ans.y << endl;
  return 0;
}