CF293D Ksusha and Square
Description
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 Format
The first line contains integer $ n $ $ (3
Output Format
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} $ .