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 JAVA):

Solution:
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.io.Writer;
import java.util.Collection;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.TreeSet;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author ogiekako
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		MyScanner in = new MyScanner(inputStream);
		MyPrintWriter out = new MyPrintWriter(outputStream);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    int T = (int) (1e6 + 10);

    public void solve(int testNumber, MyScanner in, MyPrintWriter out) {
        int n = in.nextInt();
        P[] ps = new P[n];
        P[] rev = new P[n];
        for (int i = 0; i < n; i++) {
            ps[i] = P.of(in.nextInt() + T, in.nextInt() + T);
            rev[i] = P.of(ps[i].y, ps[i].x);
        }
        double a = solve(ps);
        double b = solve(rev);
        out.println((a + b) / 2);
    }

    int n;

    private double solve(P[] ps) {
        n = ps.length;
        for (int i = 0; i < n; i++) {
            long det = ps[next(i)].sub(ps[i]).det(ps[next(next(i))].sub(ps[i]));
            if (det < 0){
                ArrayUtils.reverse(ps);
                break;
            }
        }
        int lower = 0;
        for (int i = 0; i < n; i++) if (ps[i].compareTo(ps[lower]) < 0) lower = i;
        long[] count = new long[T * 2];
        int upper = lower;
        if (ps[prev(lower)].x == ps[lower].x) {
            upper = prev(lower);
        }
        while (ps[upper].x < ps[prev(upper)].x) {
            long x1 = ps[upper].x;
            long y1 = ps[upper].y;
            long x2 = ps[prev(upper)].x;
            long y2 = ps[prev(upper)].y;
            for (long x = x1; x < x2; x++) {
                count[((int) x)] += ((x2 - x) * y1 + (x - x1) * y2) / (x2 - x1);
            }
            upper = prev(upper);
        }
        while (ps[lower].x < ps[next(lower)].x) {
            long x1 = ps[lower].x;
            long y1 = ps[lower].y;
            long x2 = ps[next(lower)].x;
            long y2 = ps[next(lower)].y;
            for (long x = x1; x < x2; x++) {
                count[((int) x)] -= ((x2 - x) * y1 + (x - x1) * y2 - 1) / (x2 - x1);
            }
            lower = next(lower);
        }

        count[((int) ps[upper].x)] += ps[upper].y;
        count[((int) ps[lower].x)] -= ps[lower].y - 1;

        for (int x = 0; x < count.length; x++)
            if (count[x] > 0) {
                debug("A", x, count[x]);
            }

        double S = 0;
        double S2 = 0;
        double N = 0;
        for (int x = 0; x < count.length; x++) {
            N += count[x];
            S += x * count[x];
            S2 += (double) x * x * count[x];
        }
        debug(S);
        debug(S2);
        double sum = 2 * N * S2 - 2 * S * S;
        debug("sum", sum);
        return sum / ((double) N * (N - 1));
    }

    static void debug(Object... os) {
//        System.err.println(Arrays.deepToString(os));
    }

    private int prev(int p) {
        p--;
        if (p < 0) p += n;
        return p;
    }

    private int next(int p) {
        p++;
        if (p >= n) p -= n;
        return p;
    }
}

class P implements Comparable<P> {
    final long x, y;

    public P(long x, long y) {
        this.x = x; this.y = y;
    }

    static P of(long x, long y) {
        return new P(x, y);
    }

    public P sub(P p) {
        return of(x - p.x, y - p.y);
    }

    public long det(P p) {
        return x * p.y - y * p.x;
    }

    public int compareTo(P o) {
        return x == o.x ? compare(y, o.y) : compare(x, o.x);
    }

    private int compare(long a, long b) {
        return a < b ? -1 : a > b ? 1 : 0;
    }
}

class MyScanner {
    private final InputStream in;

    public MyScanner(InputStream in) {
        this.in = in;
    }

    int bufLen;
    int bufPtr;
    byte[] buf = new byte[1024];

    public int read() {
        if (bufLen == -1)
            throw new InputMismatchException();
        if (bufPtr >= bufLen) {
            bufPtr = 0;
            try {
                bufLen = in.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (bufLen <= 0)
                return -1;
        }
        return buf[bufPtr++];
    }

    public int nextInt() {
        int c = read();
        if (c == -1) throw new NoSuchElementException();
        while (c != '-' && (c < '0' || '9' < c)) {
            c = read();
            if (c == -1) throw new NoSuchElementException();
        }
        if (c == '-') return -nextInt();
        int res = 0;
        do {
            res *= 10;
            res += c - '0';
            c = read();
        } while ('0' <= c && c <= '9');
        return res;
    }


    }

class MyPrintWriter {
    PrintWriter out;

    public MyPrintWriter(OutputStream outputStream) {
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public MyPrintWriter(Writer writer) {
        out = new PrintWriter(writer);
    }

    public void println(Object... os) {
        for (int i = 0; i < os.length - 1; i++) {
            out.print(os[i]);
            out.print(' ');
        }
        out.println(os[os.length - 1]);
    }

    public void close() {
        out.close();
    }

    }

class ArrayUtils {


    public static<T> void reverse(T[] is) {
        int n = is.length;
        for (int i = 0; i * 2 < n; i++) {
            T tmp = is[i]; is[i] = is[n - 1 - i]; is[n - 1 - i] = tmp;
        }
    }

    }