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 = 100010;
struct pt {
  int x, y;
  pt(int xx = 0, int yy = 0) : x(xx), y(yy) {}
};
pt operator-(pt a, pt b) { return pt(a.x - b.x, a.y - b.y); }
bool operator<(const pt &a, const pt &b) {
  return a.x < b.x || (a.x == b.x && a.y < b.y);
}
long long cross(pt a, pt b) { return (a.x + 0ll) * b.y - (a.y + 0ll) * b.x; }
int sta[maxn << 1], top;
pt p[maxn];
void convex(int n) {
  top = 0;
  sort(p + 1, p + 1 + n);
  int i, j;
  for (i = 1; i <= n; i++) {
    while (top >= 2 &&
           cross(p[i] - p[sta[top]], p[sta[top]] - p[sta[top - 1]]) >= 0)
      top--;
    sta[++top] = i;
  }
  j = top;
  for (i = n - 1; i >= 1; i--) {
    while (top > j &&
           cross(p[i] - p[sta[top]], p[sta[top]] - p[sta[top - 1]]) >= 0)
      top--;
    sta[++top] = i;
  }
  top--;
}
double ans = 0;
int shang[2000010], xia[2000010];
double solve(int n) {
  convex(n);
  int s, x, i, j;
  int mi = 210000000, ma = 0;
  for (i = 1; i <= top; i++) {
    if (p[sta[i]].x == p[sta[i + 1]].x) {
      s = max(p[sta[i]].y, p[sta[i + 1]].y);
      x = min(p[sta[i]].y, p[sta[i + 1]].y);
      shang[p[sta[i]].x] = s;
      xia[p[sta[i]].x] = x;
    } else if (p[sta[i]].x < p[sta[i + 1]].x) {
      j = p[sta[i]].x;
      x = p[sta[i]].y;
      do {
        xia[j] = x;
        j++;
        while (cross(pt(j, x) - p[sta[i]], p[sta[i + 1]] - p[sta[i]]) > 0) x++;
        while (cross(pt(j, x - 1) - p[sta[i]], p[sta[i + 1]] - p[sta[i]]) <= 0)
          x--;
      } while (j <= p[sta[i + 1]].x);
    } else {
      j = p[sta[i]].x;
      x = p[sta[i]].y;
      do {
        shang[j] = x;
        j--;
        while (cross(pt(j, x) - p[sta[i]], p[sta[i + 1]] - p[sta[i]]) > 0) x--;
        while (cross(pt(j, x + 1) - p[sta[i]], p[sta[i + 1]] - p[sta[i]]) <= 0)
          x++;
      } while (j >= p[sta[i + 1]].x);
    }
    mi = min(mi, p[sta[i]].x);
    ma = max(ma, p[sta[i]].x);
  }
  long long tot = 0, ss = 0, tmp;
  for (i = mi; i <= ma; i++)
    tot += shang[i] - xia[i] + 1, ss += (shang[i] - xia[i] + 1ll) * i;
  for (i = mi; i <= ma; i++) {
    ans += (shang[i] - xia[i] + 1ll) * i / (tot - 1.0) *
           ((tot * i - ss) / (tot + 0.0));
  }
  return ans;
}
int main() {
  int n;
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++)
    scanf("%d%d", &p[i].x, &p[i].y), p[i].x += 1000000, p[i].y += 1000000;
  solve(n);
  for (i = 1; i <= n; i++) swap(p[i].x, p[i].y);
  solve(n);
  printf("%.12lf\n", ans);
}