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;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
struct Point {
  int x, y;
  int read() {
    int ok = scanf("%d%d", &x, &y);
    return ok == 2;
  }
  Point() {}
  Point(int _x, int _y) : x(_x), y(_y) {}
  inline Point operator-(const Point &p) const {
    return Point(x - p.x, y - p.y);
  }
  inline long long operator^(const Point &p) const {
    return (long long)x * p.y - (long long)y * p.x;
  }
  inline bool operator<(const Point &p) const {
    if (y != p.y) return y < p.y;
    return x < p.x;
  }
  inline bool operator==(const Point &p) const { return x == p.x && y == p.y; }
};
const int maxc = (int)1e6;
int tmpCnts[maxc * 2 + 1], *cnts = tmpCnts + maxc + 1;
inline double get(const Point &p1, const Point &p2, int y) {
  return p1.x + (p2.x - p1.x) * (y - p1.y + 0.0) / (p2.y - p1.y);
}
double solve(Point *ps, int n) {
  rotate(ps, min_element(ps, ps + n), ps + n);
  ps[n] = ps[0];
  long long S = 0;
  for (int i = 0; i < n; i++) S += ps[i] ^ ps[i + 1];
  if (S < 0) reverse(ps + 1, ps + n), S = -S;
  int n0 = n;
  n = 0;
  for (int i = 0; i <= n0; i++) {
    if (n && ps[i] == ps[n - 1]) continue;
    if (n >= 2 && !((ps[n - 1] - ps[n - 2]) ^ (ps[i] - ps[n - 2]))) --n;
    ps[n++] = ps[i];
  }
  --n;
  int miny = maxc, maxy = -maxc;
  for (int i = 0; i < n; i++)
    miny = min(miny, ps[i].y), maxy = max(maxy, ps[i].y);
  assert(ps[0].y == miny);
  ps[n] = ps[0];
  {
    long long Sn = 0;
    for (int i = 0; i < n; i++) Sn += ps[i] ^ ps[i + 1];
    assert(S == Sn);
    ps[n + 1] = ps[1];
    for (int i = 0; i < n; i++)
      assert((ps[i] - ps[i + 1]) ^ (ps[i] - ps[i + 2]));
  }
  double ans = 0;
  long long sum = 0, cntSum = 0;
  for (int y = miny, left = n, right = 0; y <= maxy; ++y) {
    while (left > 0 && ps[left - 1].y < y) --left;
    while (right < n && ps[right + 1].y < y) ++right;
    assert(left > 0 && right < n);
    int minx = (ps[left].y == ps[left - 1].y
                    ? min(ps[left].x, ps[left - 1].x)
                    : ceil(get(ps[left], ps[left - 1], y) - (1e-9)));
    int maxx = (ps[right].y == ps[right + 1].y
                    ? max(ps[right].x, ps[right + 1].x)
                    : floor(get(ps[right], ps[right + 1], y) + (1e-9)));
    assert(maxx >= minx - 1);
    cnts[y] = maxx - minx + 1;
    sum += (long long)cnts[y] * y;
    ans += (long long)cnts[y] * y * y;
    cntSum += cnts[y];
  }
  if (cntSum < 2) return 0;
  ans -= (double)sum * sum / cntSum;
  ans /= cntSum - 1;
  ans *= 2;
  return ans;
}
const int maxn = (int)1e5;
Point ps[maxn + 2], ps0[maxn];
int main() {
  srand(rdtsc());
  int n;
  while (scanf("%d", &n) >= 1) {
    for (int i = 0; i < n; i++) assert(ps0[i].read());
    double ans = 0;
    for (int coord = 0; coord < 2; coord++) {
      memcpy(ps, ps0, sizeof(ps[0]) * n);
      ans += solve(ps, n);
      for (int i = 0; i < n; i++) swap(ps0[i].x, ps0[i].y);
    }
    ans /= 2;
    printf("%.18lf\n", ans);
  }
  return 0;
}