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 n;
pair<int, int> p[100010], up[100010], down[100010];
double ans;
void read(int &x) {
  char ch = getchar();
  int mark = 1;
  for (; ch != '-' && (ch < '0' || ch > '9'); ch = getchar())
    ;
  if (ch == '-') mark = -1, ch = getchar();
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - 48;
  x *= mark;
}
long long cp(pair<int, int> A, pair<int, int> B, pair<int, int> C) {
  return (long long)(B.first - A.first) * (C.second - A.second) -
         (long long)(C.first - A.first) * (B.second - A.second);
}
int GetU(pair<int, int> *a, int tot, int x) {
  int t = upper_bound(a + 1, a + tot + 1, make_pair(x, 1000000)) - a - 1;
  if (a[t].first == x) return a[t].second;
  int tmp = (double)(a[t + 1].second - a[t].second) /
                (a[t + 1].first - a[t].first) * (x - a[t].first) +
            a[t].second;
  for (int i = tmp + 1;; i--)
    if (cp(a[t], make_pair(x, i), a[t + 1]) >= 0) return i;
}
int GetD(pair<int, int> *a, int tot, int x) {
  int t = upper_bound(a + 1, a + tot + 1, make_pair(x, 1000000)) - a - 1;
  if (a[t].first == x) return a[t].second;
  int tmp = (double)(a[t + 1].second - a[t].second) /
                (a[t + 1].first - a[t].first) * (x - a[t].first) +
            a[t].second;
  for (int i = tmp - 1;; i++)
    if (cp(a[t], make_pair(x, i), a[t + 1]) <= 0) return i;
}
double Solve() {
  double X1 = 0, X2 = 0, Y = 0;
  int st = 0, en = 0, utot = 0, dtot = 0;
  for (int i = 1; i <= n; i++) {
    if (st == 0 || p[st].first > p[i].first ||
        (p[st].first == p[i].first && p[st].second < p[i].second))
      st = i;
    if (en == 0 || p[en].first < p[i].first ||
        (p[en].first == p[i].first && p[en].second < p[i].second))
      en = i;
  }
  if (cp(p[st], p[((st == n) ? 1 : st + 1)], p[((st == 1) ? n : st - 1)]) < 0)
    for (int i = st; i != en; i = ((i == n) ? 1 : i + 1)) up[++utot] = p[i];
  else
    for (int i = st; i != en; i = ((i == 1) ? n : i - 1)) up[++utot] = p[i];
  up[++utot] = p[en];
  st = en = 0;
  for (int i = 1; i <= n; i++) {
    if (st == 0 || p[st].first > p[i].first ||
        (p[st].first == p[i].first && p[st].second > p[i].second))
      st = i;
    if (en == 0 || p[en].first < p[i].first ||
        (p[en].first == p[i].first && p[en].second > p[i].second))
      en = i;
  }
  if (cp(p[st], p[((st == n) ? 1 : st + 1)], p[((st == 1) ? n : st - 1)]) > 0)
    for (int i = st; i != en; i = ((i == n) ? 1 : i + 1)) down[++dtot] = p[i];
  else
    for (int i = st; i != en; i = ((i == 1) ? n : i - 1)) down[++dtot] = p[i];
  down[++dtot] = p[en];
  for (int i = p[st].first; i <= p[en].first; i++) {
    int U = GetU(up, utot, i), D = GetD(down, dtot, i);
    Y += U - D + 1;
    X2 += (long long)(U - D + 1) * i;
    X1 += (long long)(U - D + 1) * i * i;
  }
  return (2 * X1 * (Y - 1) - 2 * (X2 * X2 - X1)) / Y / (Y - 1) / 2;
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(p[i].first), read(p[i].second);
  ans = Solve();
  for (int i = 1; i <= n; i++) swap(p[i].first, p[i].second);
  ans += Solve();
  printf("%.9lf\n", ans);
  return 0;
}