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;
const int maxn = 100005;
int n;
struct data {
  int x, y;
} d[maxn];
double U[2000005], D[2000005], ans;
void Max(double &x, double y) {
  if (x < y) x = y;
}
void Min(double &x, double y) {
  if (x > y) x = y;
}
void work() {
  int i, j, mx = 0;
  d[n] = d[0];
  for (i = 0; i < n; i++)
    if (mx < d[i].x) mx = d[i].x;
  for (i = 0; i <= mx; i++) D[i] = 2000005., U[i] = -1.;
  for (i = 0; i < n; i++) {
    if (d[i].x == d[i + 1].x) {
      Max(U[d[i].x], d[i].y);
      Max(U[d[i].x], d[i + 1].y);
      Min(D[d[i].x], d[i].y);
      Min(D[d[i].x], d[i + 1].y);
    } else {
      int l, r;
      double k = 1. * (d[i + 1].y - d[i].y) / (d[i + 1].x - d[i].x), b;
      if (d[i].x < d[i + 1].x)
        l = d[i].x, r = d[i + 1].x, b = d[i].y;
      else
        l = d[i + 1].x, r = d[i].x, b = d[i + 1].y;
      for (j = l; j <= r; j++) {
        Max(U[j], b + (j - l) * k);
        Min(D[j], b + (j - l) * k);
      }
    }
  }
  double sum, sum2, cnt, res;
  sum = sum2 = cnt = res = 0.;
  for (i = 0; i <= mx; i++) {
    double c = floor(U[i]) - ceil(D[i]) + 1.;
    res += (cnt * i * i - 2. * sum * i + sum2) * c;
    sum += c * i;
    sum2 += c * i * i;
    cnt += c;
  }
  ans += res / (cnt * (cnt - 1));
}
int main() {
  scanf("%d", &n);
  int i, mx, my;
  mx = my = 0x7fffffff;
  for (i = 0; i < n; i++) {
    scanf("%d%d", &d[i].x, &d[i].y);
    if (d[i].x < mx) mx = d[i].x;
    if (d[i].y < my) my = d[i].y;
  }
  for (i = 0; i < n; i++) {
    d[i].x -= mx;
    d[i].y -= my;
  }
  work();
  for (i = 0; i < n; i++) swap(d[i].x, d[i].y);
  work();
  printf("%f\n", ans);
  return 0;
}