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>
namespace orz {
const char *LL_SPECIFIER = "%I64d";
const long double eps = 1e-9;
inline void read(int &x) { scanf("%d", &x); }
inline void read(char *x) { scanf("%s", x); }
template <typename T1, typename T2>
inline void read(T1 &x1, T2 &x2) {
  read(x1);
  read(x2);
}
template <typename T1, typename T2, typename T3>
inline void read(T1 &x1, T2 &x2, T3 &x3) {
  read(x1);
  read(x2);
  read(x3);
}
template <typename T1, typename T2, typename T3, typename T4>
inline void read(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {
  read(x1);
  read(x2);
  read(x3);
  read(x4);
}
inline void write(const int x) { printf("%d", x); }
inline void write(const long long x) { printf(LL_SPECIFIER, x); }
inline void write(const double x) { printf("%.15lf", x); }
inline void write(const long double x) { write((double)x); }
template <typename T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
template <typename T>
inline std::set<T> &operator<<(std::set<T> &S, const T a) {
  S.insert(a);
  return S;
}
}  // namespace orz
using namespace orz;
struct dat {
  long double x, s, t, sy, sy2;
} a[2000086];
int n, x[100086], y[100086];
long double l[2000086], r[2000086], ss, st;
inline void work(int x, int y, int xx, int yy) {
  if (x > xx) {
    std::swap(x, xx);
    std::swap(y, yy);
  }
  if (x == xx) {
    if (y < l[x]) l[x] = y;
    if (yy > r[x]) r[x] = yy;
  } else
    for (int cx = (x); cx <= (xx); ++cx) {
      long double k = (double)(yy - y) * (cx - x) / (xx - x) + y;
      if (k < l[cx]) l[cx] = k;
      if (k > r[cx]) r[cx] = k;
    }
}
inline long double go() {
  long double ans = 0;
  for (int i = (0); i < (2000086); ++i) {
    l[i] = 2000086;
    r[i] = 0;
  }
  for (int i = (1); i <= (n); ++i) work(x[i], y[i], x[i + 1], y[i + 1]);
  int m = 0;
  for (int i = (0); i < (2000086); ++i)
    if (l[i] < 2000086) {
      int L = (int)(l[i] - eps) + 1, R = (int)(r[i] + eps);
      ++m;
      a[m].x = i;
      a[m].s = R - L + 1;
      a[m].t = a[m].x * a[m].s;
    }
  ss = 0;
  st = 0;
  for (int i = (1); i <= (m); ++i) {
    ss += a[i].s;
    st += a[i].t;
  }
  for (int i = (1); i <= (m); ++i)
    ans += a[i].t * a[i].x * (ss - a[i].s) - a[i].t * (st - a[i].t);
  return ans;
}
int main() {
  read(n);
  for (int i = (1); i <= (n); ++i) {
    read(x[i], y[i]);
    x[i] += 2000086 / 2;
    y[i] += 2000086 / 2;
  }
  x[n + 1] = x[1];
  y[n + 1] = y[1];
  long double ans = 0;
  ans += go();
  for (int i = (1); i <= (n + 1); ++i) std::swap(x[i], y[i]);
  ans = (ans + go()) / (ss * (ss - 1));
  writeln(ans);
  return 0;
}