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 SIZEN = 200010;
const long long INF = 1e10;
class Point {
 public:
  long long x, y;
};
void print(const Point &p) { cout << "(" << p.x << " " << p.y << ")"; }
long long cross(const Point &a, const Point &b) {
  return a.x * b.y - b.x * a.y;
}
int N;
Point P[SIZEN];
double calc_cut(const Point &a, const Point &b, long long x) {
  return a.y + (b.y - a.y) * (x - a.x + 0.0) / (b.x - a.x);
}
double solve(void) {
  long long L = INF, R = -INF;
  for (int i = 1; i <= N; i++) {
    L = min(L, P[i].x);
    R = max(R, P[i].x);
  }
  double S0 = 0, S1 = 0, S2 = 0;
  int ld = 1;
  for (int i = 2; i <= N; i++)
    if (P[i].x < P[ld].x || (P[i].x == P[ld].x && P[i].y < P[ld].y)) ld = i;
  for (long long x = L; x <= R; x++) {
    while (P[ld].x < x) ld++;
    double y;
    if (P[ld].x == x)
      y = P[ld].y - 1;
    else
      y = ceil(calc_cut(P[ld - 1], P[ld], x)) - 1;
    S0 -= y;
    S1 -= y * x;
    S2 -= y * x * x;
  }
  int lu = 1;
  for (int i = 2; i <= N; i++)
    if (P[i].x < P[lu].x || (P[i].x == P[lu].x && P[i].y > P[lu].y)) lu = i;
  lu += N;
  for (long long x = L; x <= R; x++) {
    while (P[lu].x < x) lu--;
    double y;
    if (P[lu].x == x)
      y = P[lu].y;
    else
      y = floor(calc_cut(P[lu + 1], P[lu], x));
    S0 += y;
    S1 += y * x;
    S2 += y * x * x;
  }
  return (S2 * S0 - S1 * S1) / S0 / (S0 - 1);
}
void init(void) {
  scanf("%d", &N);
  long long area = 0;
  for (int i = 1; i <= N; i++) {
    scanf("%I64d%I64d", &P[i].x, &P[i].y);
    P[i + N] = P[i];
  }
  for (int i = 1; i <= N; i++) area += cross(P[i], P[i + 1]);
  if (area < 0) reverse(P + 1, P + 1 + 2 * N);
}
int main() {
  init();
  double ans = 0;
  ans += solve();
  for (int i = 1; i <= 2 * N; i++) swap(P[i].x, P[i].y);
  reverse(P + 1, P + 1 + 2 * N);
  ans += solve();
  printf("%.10lf\n", ans);
  return 0;
}