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 <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
template <typename T1, typename T2>
inline T1 gmax(T1 &a, T2 b) {
  return a = a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 gmin(T1 &a, T2 b) {
  return a = a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
}  // namespace ae86
using ae86::ty;
const int _ = 100007, X = 1000000, inf = 0x3f3f3f3f;
struct points {
  long long x, y;
  points(long long x_ = 0, long long y_ = 0) { x = x_, y = y_; }
  void takein() { x = ty(), y = ty(); }
  void rever() { swap(x, y); }
  friend points operator+(points a, points b) {
    return points(a.x + b.x, a.y + b.y);
  }
  friend points operator-(points a, points b) {
    return points(a.x - b.x, a.y - b.y);
  }
};
inline long long dox(points a, points b) { return a.x * b.x + a.y * b.y; }
inline long long cox(points a, points b) { return a.x * b.y - a.y * b.x; }
inline long long length2(points a) { return dox(a, a); }
inline long long distan2(points a, points b) { return length2(b - a); }
int n;
points p[_];
int xlBuf[X + X + 7], xrBuf[X + X + 7], *xl = xlBuf + X + 3,
                                        *xr = xrBuf + X + 3;
double make() {
  for (int i = -X; i <= X; i++) xl[i] = inf, xr[i] = -inf;
  for (int i = 1; i <= n; i++) {
    if (p[i].x == p[i + 1].x)
      gmin(xl[p[i].x], p[i].y), gmax(xr[p[i].x], p[i].y);
    else {
      points a = p[i], b = p[i + 1];
      if (a.x > b.x) swap(a, b);
      double k = 1.00 / (b.x - a.x);
      for (int j = a.x; j <= b.x; j++) {
        double loc = ((j - a.x) * b.y + (b.x - j) * a.y) * k;
        gmin(xl[j], ceil(loc)), gmax(xr[j], floor(loc));
      }
    }
  }
  double s = 0, si = 0, si2 = 0;
  for (int i = -X; i <= X; i++) {
    if (xr[i] < xl[i]) continue;
    long long dlt = xr[i] - xl[i] + 1;
    s += dlt, si += dlt * i, si2 += dlt * i * i;
  }
  return (s * si2 - si * si) / s / (s - 1);
}
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ty();
  for (int i = 1; i <= n; i++) p[i].takein();
  p[0] = p[n], p[n + 1] = p[1];
  double ans = make();
  for (int i = 0; i <= n + 1; i++) p[i].rever();
  ans += make();
  cout << setprecision(11) << fixed << ans << lf;
  return 0;
}