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;
template <class T>
inline T min(T &a, T &b) {
  return a < b ? a : b;
}
template <class T>
inline T max(T &a, T &b) {
  return a > b ? a : b;
}
template <class T>
void read(T &x) {
  char ch;
  while ((ch = getchar()) && !isdigit(ch))
    ;
  x = ch - '0';
  while ((ch = getchar()) && isdigit(ch)) x = x * 10 + ch - '0';
}
long long Pow(long long a, long long b, long long Mod) {
  long long ans = 1;
  a %= Mod;
  for (; b; b >>= 1) ans = b & 1 ? (ans * a % Mod) : ans, a = a * a % Mod;
  return ans;
}
const int N = 2200000, L = 2000000;
struct lj {
  int x, y;
} P[N];
const long double eps = 1e-7;
int Max[N], Min[N], n;
long double ans, cnt;
void add(int X1, int Y1, int X2, int Y2) {
  if (X1 > X2) swap(X1, X2), swap(Y1, Y2);
  if (X1 == X2) {
    Min[X1] = min(Min[X1], min(Y1, Y2)), Max[X1] = max(Max[X1], max(Y1, Y2));
    return;
  }
  long double p = (long double)(Y2 - Y1) / (X2 - X1);
  for (long double c = Y1; X1 <= X2; X1++, c += p) {
    Min[X1] = min(Min[X1], (int)ceil(c - (eps)));
    Max[X1] = max(Max[X1], (int)floor(c + (eps)));
  }
}
void work() {
  for (int i = 0; i <= L; i++) Min[i] = int(2e9), Max[i] = -int(2e9);
  for (int i = 1; i <= n; i++)
    add(P[i].x, P[i].y, P[i % n + 1].x, P[i % n + 1].y);
  cnt = 0;
  long double p0 = 0, p1 = 0, p2 = 0, q0 = 0, q1 = 0, q2 = 0;
  for (int i = 0; i <= L; i++)
    if (Max[i] != -int(2e9)) {
      cnt += Max[i] - Min[i] + 1;
      p0 = Max[i] - Min[i] + 1;
      p1 = (long double)i * (Max[i] - Min[i] + 1);
      p2 = (long double)i * i * (Max[i] - Min[i] + 1);
      ans += p2 * q0 + p0 * q2 - 2. * p1 * q1;
      q0 += Max[i] - Min[i] + 1;
      q1 += (long double)i * (Max[i] - Min[i] + 1);
      q2 += (long double)i * i * (Max[i] - Min[i] + 1);
    } else
      break;
}
int main() {
  scanf("%d", &n);
  int Minx = int(2e9), Miny = int(2e9);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &P[i].x, &P[i].y), Minx = min(Minx, P[i].x),
                                     Miny = min(Miny, P[i].y);
  for (int i = 1; i <= n; i++) P[i].x -= Minx, P[i].y -= Miny;
  work();
  for (int i = 1; i <= n; i++) swap(P[i].x, P[i].y);
  work();
  printf("%.10lf\n", (double)(ans / cnt / (cnt - 1.)));
}