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;
namespace my_useful_tools {
const int INF = 0x3f3f3f3f;
inline void pc(char c) { putchar(c); }
template <class T>
inline T gcd(T a, T b) {
  return b == 0 ? a : gcd(b, a % b);
}
template <class T>
inline void W(T p) {
  if (p < 0) pc('-'), p = -p;
  if (p / 10 != 0) W(p / 10);
  pc('0' + p % 10);
}
template <class T>
inline void Wn(T p) {
  W(p), puts("");
}
template <class T>
inline void W(T a, T b) {
  W(a), pc(' '), W(b);
}
template <class T>
inline void Wn(T a, T b) {
  W(a), pc(' '), Wn(b);
}
template <class T>
inline void W(T a, T b, T c) {
  W(a), pc(' '), W(b), pc(' '), W(c);
}
inline char gchar() {
  char ret = getchar();
  for (; ret == '\n' || ret == '\r' || ret == ' '; ret = getchar())
    ;
  return ret;
}
template <class T>
inline void fr(T& ret) {
  char c = ' ';
  int flag = 1;
  for (c = getchar(); c != '-' && !('0' <= c && c <= '9'); c = getchar())
    ;
  if (c == '-')
    flag = -1, ret = 0;
  else
    ret = c - '0';
  for (c = getchar(); '0' <= c && c <= '9'; c = getchar())
    ret = ret * 10 + c - '0';
  ret = ret * flag;
}
inline int fr() {
  int x;
  fr(x);
  return x;
}
template <class T>
inline void fr(T& a, T& b) {
  fr(a), fr(b);
}
template <class T>
inline void fr(T& a, T& b, T& c) {
  fr(a), fr(b), fr(c);
}
template <class T>
inline T fast_pow(T base, T index, T mod = 2147483647, T ret = 1) {
  for (; index; index >>= 1, base = base * base % mod)
    if (index & 1) ret = ret * base % mod;
  return ret;
}
const int maxv = 100, maxe = 100;
struct Edge {
  int edge, head[maxv], to[maxe], next[maxe];
  Edge() {
    edge = 0;
    memset(head, -1, sizeof head);
  }
  void addedge(int u, int v) {
    to[edge] = v, next[edge] = head[u];
    head[u] = edge++;
  }
};
};  // namespace my_useful_tools
using namespace my_useful_tools;
const int maxn = 1e5 + 100;
const int maxc = 1e6 + 10;
const int maxr = 2e6 + 100;
int x[maxn], y[maxn];
double x1[maxr], x2[maxr];
int n, cnt[maxr];
double ans;
void calc() {
  int mi = INF, mx = -INF;
  for (int i = 0; i < maxr; ++i) {
    x1[i] = mx, x2[i] = mi;
  }
  for (int i = 1; i <= n; ++i) {
    int ux = x[i], uy = y[i], vx = x[i + 1 > n ? 1 : i + 1],
        vy = y[i + 1 > n ? 1 : i + 1];
    mi = min(mi, ux), mx = max(mx, ux);
    if (ux == vx) {
      x1[ux] = max(1. * max(uy, vy), x1[ux]);
      x2[ux] = min(1. * min(uy, vy), x2[ux]);
    } else {
      if (vx < ux) {
        swap(ux, vx), swap(uy, vy);
      }
      for (int r = ux; r <= vx; ++r) {
        double t = 1. * (uy - vy) / (ux - vx) * (r - ux) + uy;
        x1[r] = max(x1[r], t);
        x2[r] = min(x2[r], t);
      }
    }
  }
  long long tot = 0;
  for (int i = mi; i <= mx; ++i) {
    int dn = (int)(x2[i] - 1e-5) + 1, up = (int)(x1[i]);
    tot += (cnt[i - mi] = up - dn + 1);
  }
  double sum = 0, s1 = 0, s2 = 0, s3 = 0;
  for (int i = 0; i <= mx - mi; ++i) {
    sum += 1. * cnt[i] * (1. * i * i * s1 - 2. * i * s2 + s3);
    s1 += cnt[i];
    s2 += 1. * i * cnt[i];
    s3 += 1. * i * i * cnt[i];
  }
  sum /= (1. * tot * (tot - 1) / 2);
  ans += sum;
}
int main() {
  fr(n);
  for (int i = 1; i <= n; ++i) {
    fr(x[i], y[i]);
    x[i] += 1000000, y[i] += 1000000;
  }
  calc();
  for (int i = 1; i <= n; ++i) {
    swap(x[i], y[i]);
  }
  calc();
  printf("%.10lf\n", ans / 2);
  return 0;
}