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;
int dcmp(long double p) {
  if (abs(p) < 1e-13) return 0;
  return p > 1e-13 ? 1 : -1;
}
vector<long double> L[2000010];
int n;
void read() {
  scanf("%d", &n);
  static long long x[100010], y[100010];
  for (int i = 1; i <= n; ++i) {
    cin >> x[i] >> y[i];
    x[i] += 1000001, y[i] += 1000001;
  }
  for (int i = 1; i <= n; ++i) {
    if (x[i] == x[i % n + 1])
      L[x[i]].push_back(y[i]), L[x[i]].push_back(y[i % n + 1]);
    else {
      long double k = 1.0 * (y[i % n + 1] - y[i]) / (x[i % n + 1] - x[i]),
                  b = y[i] - x[i] * k;
      for (int j = min(x[i], x[i % n + 1]); j <= max(x[i], x[i % n + 1]); ++j) {
        long double vy = k * j + b;
        if (dcmp(k) >= 0)
          L[j].push_back(vy);
        else
          L[j].push_back(vy);
      }
    }
  }
}
long long sum2(int n) {
  long long a = n, b = n + 1, c = 2 * n + 1;
  if (a % 2 == 0)
    a /= 2;
  else
    b /= 2;
  if (a % 3 == 0)
    a /= 3;
  else if (b % 3 == 0)
    b /= 3;
  else
    c /= 3;
  return a * b * c;
}
long double work() {
  long long total = 0;
  for (int i = 1; i <= 2000005; ++i)
    if (L[i].size() > 1u) {
      sort(L[i].begin(), L[i].end());
      L[i].resize(unique(L[i].begin(), L[i].end()) - L[i].begin());
      if (L[i].size() > 1u) {
        long long l = ceil(L[i][0] - 1e-13),
                  r = floor(L[i][L[i].size() - 1u] + 1e-13);
        total += r - l + 1;
      } else if (L[i].size())
        ++total;
    }
  long double sumx1 = 0, sumy1 = 0, sumx2 = 0, sumy2 = 0, v = 1.0 / total;
  for (int i = 1; i <= 2000005; ++i) {
    if (L[i].size() > 1u) {
      long long l = ceil(L[i][0] - 1e-13),
                r = floor(L[i][L[i].size() - 1u] + 1e-13);
      sumx1 += v * (r - l + 1) * i, sumx2 += v * (r - l + 1) * i * i;
      sumy1 += v * (l + r) * (r - l + 1) / 2,
          sumy2 += v * (sum2(r) - sum2(l - 1));
    } else if (L[i].size() == 1u) {
      long long y = floor(L[i][0] + 1e-13);
      sumx1 += v * i, sumx2 += v * i * i;
      sumy1 += v * y, sumy2 += v * y * y;
    }
  }
  return (sumx2 + sumy2 - sumx1 * sumx1 - sumy1 * sumy1) / v / (total - 1);
}
int main() {
  read();
  printf("%.10f\n", (double)work());
  return 0;
}