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 inf = (int)1e9;
const long double eps = 1e-9;
const int maxn = (int)1e5 + 10;
struct pt {
  long long x, y;
  pt() : x(0), y(0) {}
  pt(long long x, long long y) : x(x), y(y) {}
  void read() { scanf("%I64d%I64d", &x, &y); }
};
inline pt operator+(pt p1, pt p2) { return pt(p1.x + p2.x, p1.y + p2.y); }
inline pt operator-(pt p1, pt p2) { return pt(p1.x - p2.x, p1.y - p2.y); }
inline long long vect(pt p1, pt p2) { return p1.x * p2.y - p1.y * p2.x; }
inline bool upper(pt left, pt right, pt p) {
  return vect(right - left, p - left) > 0;
}
inline bool lower(pt left, pt right, pt p) {
  return vect(right - left, p - left) < 0;
}
inline bool operator<(pt p1, pt p2) {
  return make_pair(p1.x, p1.y) < make_pair(p2.x, p2.y);
}
inline long long sum(long long x) {
  if (x > 0) return (x * (x + 1) * (2 * x + 1)) / 6;
  if (x < 0) {
    return -sum(-x - 1);
  }
  return 0;
}
pt a[maxn];
vector<int> up, down;
pt S;
long double S2 = 0;
long double N = 0;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; (i) < (n); ++i) a[i].read();
  sort(a, a + n);
  int xmin = a[0].x;
  int xmax = a[n - 1].x;
  up.push_back(0), down.push_back(0);
  for (int i = 1; i < n - 1; i++) {
    if (upper(a[0], a[n - 1], a[i]))
      up.push_back(i);
    else
      down.push_back(i);
  }
  int iup = 0, idown = 0;
  up.push_back(n - 1), down.push_back(n - 1);
  while (a[up[iup]].x == a[0].x) iup += 1;
  iup -= 1;
  int downEnd = ((int)(down).size()) - 1;
  while (a[down[downEnd]].x == a[n - 1].x) downEnd -= 1;
  downEnd += 1;
  long long ymin = 0, ymax = 0;
  for (int x = xmin; x <= xmax; x++) {
    if (x > xmin && x < xmax) {
      while (!upper(a[up[iup]], a[up[iup + 1]], pt(x, ymax))) ymax += 1;
      while (upper(a[up[iup]], a[up[iup + 1]], pt(x, ymax))) ymax -= 1;
      while (!lower(a[down[idown]], a[down[idown + 1]], pt(x, ymin))) ymin -= 1;
      while (lower(a[down[idown]], a[down[idown + 1]], pt(x, ymin))) ymin += 1;
    } else if (x == xmin) {
      ymin = a[0].y;
      ymax = a[up[iup]].y;
    } else if (x == xmax) {
      ymax = a[n - 1].y;
      ymin = a[down[downEnd]].y;
    }
    N += ymax - ymin + 1;
    S = S + pt((ymax - ymin + 1) * x, ((ymax - ymin + 1) * (ymin + ymax)) >> 1);
    S2 += (ymax - ymin + 1) * (long long)x * x + sum(ymax) - sum(ymin - 1);
    if (a[up[iup + 1]].x == x) iup += 1;
    if (a[down[idown + 1]].x == x) idown += 1;
  }
  long double RES =
      (S2 - (S.x * (long double)S.x + S.y * (long double)S.y) / N) / (N - 1);
  RES = RES;
  printf("%.18lf\n", (double)RES);
  return 0;
}