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 = 101010;
int n;
class Point {
 public:
  int x, y;
  Point() {}
  Point(int x, int y) : x(x), y(y) {}
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
} a[MAXN];
double det(const Point &a, const Point &b) {
  return 1.0 * a.x * b.y - 1.0 * a.y * b.x;
}
bool cmpx(const Point &a, const Point &b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
int maxx, minx, maxy, miny;
int minpos, mp1;
int gup1, gup2;
int gdw1, gdw2;
int cnt[2010101];
double sx, sx2;
double ans;
bool changed;
void solve() {
  int cury1, cury2;
  cury1 = cury2 = a[minpos].y;
  gup1 = gdw1 = minpos;
  gup2 = minpos + 1;
  gdw2 = minpos - 1;
  if (gup2 > n) gup2 -= n;
  if (gdw2 < 1) gdw2 += n;
  changed = false;
  if (1.0 * (a[gup2].y - a[gup1].y + 1e-8) * (1e-8 + a[gdw2].x - a[gdw1].x) <
      1.0 * (1e-8 + a[gdw2].y - a[gdw1].y) * (1e-8 + a[gup2].x - a[gup1].x))
    changed = true;
  Point now;
  double cnt = 0;
  sx = sx2 = 0;
  bool flag = true, flag1 = true;
  for (int x1 = minx; x1 <= maxx; ++x1) {
    while ((x1 > a[gup2].x ||
            (x1 != maxx && a[gup1].x == x1 && a[gup1].x == a[gup2].x))) {
      gup1 = gup2;
      gup2++;
      if (gup2 > n) gup2 -= n;
    }
    while ((x1 > a[gdw2].x ||
            (x1 != maxx && a[gdw1].x == a[gdw2].x && a[gdw1].x == x1))) {
      gdw1 = gdw2;
      gdw2--;
      if (gdw2 < 1) gdw2 += n;
    }
    if (flag)
      if (!changed && a[gup1].y > a[gup2].y)
        flag = false;
      else if (changed && a[gdw1].y > a[gdw2].y)
        flag = false;
    if (x1 == minx && !changed) {
      cury1 = max(cury1, a[gup1].y);
      cury2 = min(cury2, a[gdw1].y);
    }
    if (x1 == minx && changed) {
      cury1 = max(cury1, a[gdw1].y);
      cury2 = min(cury2, a[gup1].y);
    }
    if (flag1)
      if (changed && a[gup1].y < a[gup2].y)
        flag1 = false;
      else if (!changed && a[gdw1].y < a[gdw2].y)
        flag1 = false;
    now.x = x1;
    now.y = cury1;
    if (!changed) {
      if (flag) {
        now.y++;
        while (det(now - a[gup2], now - a[gup1]) >= 0) now.y++;
        cury1 = now.y - 1;
      } else {
        while (det(now - a[gup2], now - a[gup1]) < 0) now.y--;
        cury1 = now.y;
      }
      now.y = cury2;
      if (flag1) {
        now.y--;
        while (det(now - a[gdw2], now - a[gdw1]) <= 0) now.y--;
        cury2 = now.y + 1;
      } else {
        while (det(now - a[gdw2], now - a[gdw1]) > 0) now.y++;
        cury2 = now.y;
      }
    } else {
      if (flag) {
        now.y++;
        while (det(now - a[gdw2], now - a[gdw1]) >= 0) now.y++;
        cury1 = now.y - 1;
      } else {
        while (det(now - a[gdw2], now - a[gdw1]) < 0) now.y--;
        cury1 = now.y;
      }
      now.y = cury2;
      if (flag1) {
        now.y--;
        while (det(now - a[gup2], now - a[gup1]) <= 0) now.y--;
        cury2 = now.y + 1;
      } else {
        while (det(now - a[gup2], now - a[gup1]) > 0) now.y++;
        cury2 = now.y;
      }
    }
    sx2 += 1.0 * (cury1 - cury2 + 1) * x1 * x1;
    sx += 1.0 * (cury1 - cury2 + 1) * x1;
    cnt += cury1 - cury2 + 1;
  }
  double key;
  key = sx * sx;
  key -= sx2 * cnt;
  key = -key;
  key /= cnt * (cnt - 1) / 2;
  ans += key;
}
int top, down;
int main() {
  scanf("%d", &n);
  maxx = maxy = -1010101;
  minx = miny = 1010101;
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &a[i].x, &a[i].y);
    maxx = max(a[i].x, maxx);
    if (a[i].x < minx) {
      minpos = i;
      minx = a[i].x;
    }
    maxy = max(a[i].y, maxy);
    if (a[i].y < miny) {
      mp1 = i;
      miny = a[i].y;
    }
  }
  solve();
  for (int i = 1; i <= n; ++i) {
    swap(a[i].x, a[i].y);
  }
  minpos = mp1;
  minx = miny;
  maxx = maxy;
  solve();
  printf("%.10lf\n", ans / 2);
  return 0;
}