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> p[300000];
int freq[2][10 * 300000];
long long num = 0;
vector<int> mx, my;
void update(int p1) {
  if (mx.empty()) {
    mx.push_back(p1);
    my.push_back(p1);
    return;
  }
  if (p[mx[0]].first == p[p1].first) {
    mx.push_back(p1);
  } else if (p[mx[0]].first < p[p1].first) {
    mx.clear();
    mx.push_back(p1);
  }
  if (p[my[0]].second == p[p1].second)
    my.push_back(p1);
  else if (p[my[0]].second < p[p1].second) {
    my.clear();
    my.push_back(p1);
  }
}
double get_y(int first, pair<int, int> p1, pair<int, int> p2) {
  if (p1.first == p2.first) return p1.second;
  return 1.0 * (first - p2.first) / (p1.first - p2.first) *
             (p1.second - p2.second) +
         p2.second;
}
double get_x(int second, pair<int, int> p1, pair<int, int> p2) {
  if (p1.second == p2.second) return p1.first;
  return 1.0 * (second - p2.second) / (p1.second - p2.second) *
             (p1.first - p2.first) +
         p2.first;
}
void walk_x() {
  int lo, hi;
  if (mx.size() == 1) {
    lo = mx[0];
    hi = mx[0];
  } else {
    lo = mx[0];
    hi = mx[1];
    if (lo == 0 && hi == n - 1) swap(lo, hi);
  }
  for (int first = p[lo].first;; first--) {
    if (first < p[lo].first) lo = (lo + n - 1) % n;
    if (first < p[lo].first) break;
    if (first < p[hi].first) hi = (hi + 1) % n;
    if (first < p[hi].first) break;
    double y1 = get_y(first, p[lo], p[(lo + 1) % n]);
    double y2 = get_y(first, p[hi], p[(hi + n - 1) % n]);
    if (y2 < y1) swap(y1, y2);
    int yy1 = ceil(y1 - 1e-9);
    int yy2 = floor(y2 + 1e-9);
    freq[0][first + 1000000] = yy2 - yy1 + 1;
  }
}
void walk_y() {
  int lo, hi;
  if (my.size() == 1) {
    lo = my[0];
    hi = my[0];
  } else {
    lo = my[0];
    hi = my[1];
    if (lo == 0 && hi == n - 1) swap(lo, hi);
  }
  for (int second = p[lo].second;; second--) {
    if (second < p[lo].second) lo = (lo + n - 1) % n;
    if (second < p[lo].second) break;
    if (second < p[hi].second) hi = (hi + 1) % n;
    if (second < p[hi].second) break;
    double x1 = get_x(second, p[lo], p[(lo + 1) % n]);
    double x2 = get_x(second, p[hi], p[(hi + n - 1) % n]);
    if (x2 < x1) swap(x1, x2);
    int xx1 = ceil(x1 - 1e-9);
    int xx2 = floor(x2 + 1e-9);
    freq[1][second + 1000000] = xx2 - xx1 + 1;
  }
}
double get_ans() {
  double tot = 0;
  double sum[2] = {0, 0};
  for (int i = -1000000; i <= 1000000; i++) {
    num += freq[0][i + 1000000];
  }
  for (int i = -1000000; i <= 1000000; i++) {
    for (int j = 0; j < 2; j++) {
      tot += 1.0 * freq[j][i + 1000000] * i * i * num;
      sum[j] += 1.0 * i * freq[j][i + 1000000];
    }
  }
  tot -= sum[0] * sum[0] + sum[1] * sum[1];
  tot /= num;
  tot /= num - 1;
  return tot;
}
int main() {
  memset(freq, 0, sizeof(freq));
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &p[i].first, &p[i].second);
    update(i);
  }
  walk_x();
  walk_y();
  printf("%.10f\n", get_ans());
}