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;
int n;
pair<int, int> a[100005];
int crossProd(pair<int, int> o, pair<int, int> a, pair<int, int> b) {
  long long res = 1ll * (a.first - o.first) * (b.second - o.second) -
                  1ll * (a.second - o.second) * (b.first - o.first);
  if (res > 0) return 1;
  if (res == 0) return 0;
  return -1;
}
struct hull {
  set<pair<int, int> > s;
  bool checkUnder(const pair<int, int>& p) {
    if (s.empty()) return 0;
    if (p.first < (*s.begin()).first || (*s.rbegin()).first < p.first) return 0;
    set<pair<int, int> >::iterator it =
        s.lower_bound(pair<int, int>(p.first, -(int)1e9));
    if ((*it).first == p.first) return (*it).second >= p.second;
    return crossProd(*prev(it), *it, p) <= 0;
  };
  void insert(const pair<int, int>& p) {
    set<pair<int, int> >::iterator it =
        s.lower_bound(pair<int, int>(p.first, -(int)1e9));
    if (it != s.end() && (*it).first == p.first) {
      if ((*it).second >= p.second)
        return;
      else
        s.erase(it);
    }
    s.insert(p);
    set<pair<int, int> >::iterator ppos = s.find(p);
    if (ppos != s.begin() && next(ppos) != s.end()) {
      pair<int, int> bef = *(prev(ppos));
      pair<int, int> aft = *(next(ppos));
      if (crossProd(bef, p, aft) >= 0) {
        s.erase(ppos);
        return;
      }
    }
    while (next(ppos) != s.end() && next(next(ppos)) != s.end() &&
           crossProd(p, *next(ppos), *next(next(ppos))) >= 0) {
      s.erase(next(ppos));
    }
    while (ppos != s.begin() && prev(ppos) != s.begin() &&
           crossProd(*prev(prev(ppos)), *prev(ppos), p) >= 0) {
      s.erase(prev(ppos));
    }
  };
};
long long total = 0;
hull up, down;
int cnt[2000005];
long double solve() {
  up.s.clear();
  down.s.clear();
  int minx = (int)1e6, maxx = (int)-1e6;
  for (int i = 0; i < n; i++) {
    minx = min(minx, a[i].first);
    maxx = max(maxx, a[i].first);
    up.insert(pair<int, int>(a[i].first, a[i].second));
    down.insert(pair<int, int>(a[i].first, -a[i].second));
  }
  int pivotup = (int)1e6;
  int pivotdown = (int)1e6;
  for (int i = minx; i <= maxx; i++) {
    while (!up.checkUnder(pair<int, int>(i, pivotup))) pivotup--;
    while (up.checkUnder(pair<int, int>(i, pivotup + 1))) pivotup++;
    while (!down.checkUnder(pair<int, int>(i, pivotdown))) pivotdown--;
    while (down.checkUnder(pair<int, int>(i, pivotdown + 1))) pivotdown++;
    cnt[i + (int)1e6] = max(0, pivotup - (-pivotdown) + 1);
    total += cnt[i + (int)1e6];
  }
  long double res = 0;
  long double sumaj = 0, sumajj = 0, sumajjj = 0;
  for (int i = minx; i <= maxx; i++) {
    res += 1.0 * cnt[i + (int)1e6] *
           (1.0 * sumaj * i * i + sumajjj - 2.0 * i * sumajj);
    sumaj += 1.0 * cnt[i + (int)1e6];
    sumajj += 1.0 * cnt[i + (int)1e6] * i;
    sumajjj += 1.0 * cnt[i + (int)1e6] * i * i;
  }
  return res;
}
int main() {
  iostream::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  long double ans = solve();
  for (int i = 0; i < n; i++) swap(a[i].first, a[i].second);
  ans += solve();
  total /= 2;
  cout << fixed << setprecision(10)
       << ans / 2 / (1.0 * total * (total - 1) / 2);
}