Problem: Ksusha is a vigorous mathematician. She is keen on absolutely incredible mathematical riddles. 

Today Ksusha came across a convex polygon of non-zero area. She is now wondering: if she chooses a pair of distinct points uniformly among all integer points (points with integer coordinates) inside or on the border of the polygon and then draws a square with two opposite vertices lying in the chosen points, what will the expectation of this square's area be?

A pair of distinct points is chosen uniformly among all pairs of distinct points, located inside or on the border of the polygon. Pairs of points p, q (p ≠ q) and q, p are considered the same.

Help Ksusha! Count the required expectation.

Input

The first line contains integer n (3 ≤ n ≤ 105) — the number of vertices of Ksusha's convex polygon. Next n lines contain the coordinates of the polygon vertices in clockwise or counterclockwise order. The i-th line contains integers xi, yi (|xi|, |yi| ≤ 106) — the coordinates of the vertex that goes i-th in that order.

Output

Print a single real number — the required expected area. 

The answer will be considered correct if its absolute and relative error doesn't exceed 10 - 6.

Examples

Input

3
0 0
5 5
5 0


Output

4.6666666667


Input

4
-1 3
4 5
6 2
3 -5


Output

8.1583333333


Input

3
17 136
859 937
16 641


Output

66811.3704155169

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T nextInt() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') {
    p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return x * p;
}
const int maxN = (int)1e5 + 10;
const int maxK = (int)2e6 + 10;
const int OFFSET = (int)1e6 + 1;
const int INF = (int)1e9;
const int mod = (int)1e9 + 7;
const long double LLINF = (long double)1e15;
struct pt {
  long double x, y;
};
int n;
pt poly[maxN];
vector<long double> byX[maxK];
void find(pt a, pt b, long double &A, long double &B, long double &C) {
  A = a.y - b.y;
  B = b.x - a.x;
  C = -A * a.x - B * a.y;
}
void process(pt a, pt b) {
  if (a.x == b.x) {
    byX[(int)a.x + OFFSET].push_back(a.y);
    byX[(int)b.x + OFFSET].push_back(b.y);
    return;
  }
  long double A, B, C;
  find(a, b, A, B, C);
  if (a.x > b.x) swap(a, b);
  for (int x = a.x; x <= b.x; ++x) {
    long double y = -(A * x + C) / 1.0 / B;
    byX[x + OFFSET].push_back(y);
  }
}
long double ALL = 0;
long double solve() {
  for (int i = 0; i < maxK; ++i) {
    byX[i].clear();
  }
  for (int i = 0; i < n; ++i) {
    process(poly[i], poly[i + 1]);
  }
  long double ret = 0LL;
  long double sums = 0LL;
  long double sumx = 0LL;
  long double pts = 0LL;
  for (int i = 0; i < maxK; ++i) {
    if (byX[i].empty()) continue;
    sort(byX[i].begin(), byX[i].end());
    long double x = i - OFFSET;
    long double lo = ceill(byX[i][0]);
    long double hi = floorl(byX[i].back());
    if (lo > hi) continue;
    int len = (int)hi - (int)lo + 1;
    ret += (x * 1LL * x * pts + sums - 2LL * x * sumx) * len;
    sums += x * 1LL * x * len;
    sumx += x * len;
    pts += len;
  }
  ALL = pts;
  return ret;
}
int main() {
  n = nextInt<int>();
  for (int i = 0; i < n; ++i) {
    poly[i].x = nextInt<int>();
    poly[i].y = nextInt<int>();
  }
  poly[n] = poly[0];
  long double res = 0LL;
  res += solve();
  for (int i = 0; i <= n; ++i) {
    swap(poly[i].x, poly[i].y);
  }
  res += solve();
  long double answer = res / 1.0 / ALL;
  answer /= ALL - 1;
  cout.precision(20);
  cout << answer << '\n';
  return 0;
}