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 <vector>
#include <algorithm>
#include <iomanip>
 
#define rep(i, n) for(int i = 0; i < (n); ++i)
 
using namespace std;

typedef long long ll;
typedef pair<ll, ll> Q;

int n;
int x[50];
int y[50];
Q sx[25];
Q sy[25];

ll gcd(ll a, ll b){
    return b == 0 ? a : gcd(b, a % b);
}

void make_q(ll p, ll q, Q& x){
    if(q < 0){
        p = -p;
        q = -q;
    }
    ll g = gcd(abs(p), q);
    x.first = p / g;
    x.second = q / g;
}

double eval_q(Q x){
    return double(x.first) / x.second;
}

void line_eq(int i, int j, ll& p, ll& q, ll& r){
    ll a = x[i];
    ll b = y[i];
    ll c = x[j];
    ll d = y[j];
    p = b - d;
    q = c - a;
    r = a * d - b * c;
}

void intersect(ll p0, ll q0, ll r0, ll p1, ll q1, ll r1, Q& x, Q& y){
    ll a = q0 * r1 - q1 * r0;
    ll b = p1 * r0 - p0 * r1;
    ll c = p0 * q1 - p1 * q0;
    make_q(a, c, x);
    make_q(b, c, y);
}

bool is_parallel(int i, int j, int k, int l){
    ll a = x[i] - x[j];
    ll b = y[i] - y[j];
    ll c = x[k] - x[l];
    ll d = y[k] - y[l];
    return a * d - b * c == 0;
}

bool solve(double& x, double& y){
    if(n % 2){
        return false;
    }

    int m = n / 2;
    
    rep(i, m){
        if(!is_parallel(i, i + 1, m + i, (m + i + 1) % n)){
            return false;
        }
    }

    rep(i, m){
        ll p0, q0, r0, p1, q1, r1;
        line_eq(i, m + i, p0, q0, r0);
        line_eq(i + 1, (m + i + 1) % n, p1, q1, r1);
        intersect(p0, q0, r0, p1, q1, r1, sx[i], sy[i]);
    }
    rep(i, m - 1){
        if(sx[i] != sx[m - 1] || sy[i] != sy[m - 1]){
            return false;
        }
    }
    x = eval_q(sx[0]);
    y = eval_q(sy[0]);
    return true;
}

int main(){
    cin >> n;
    rep(i, n){
        cin >> x[i] >> y[i];
    }

    double x, y;
    if(solve(x, y)){
        cout << fixed << setprecision(8) << x << ' ' << fixed << setprecision(8) << y << endl;
    }
    else{
        cout << "NA" << endl;
    }
    return 0;
}