Under construction

Still being built. Things may change

Rotate Sum 3

Time limit1sMemory limit1024 MB

Summary
Given a convex polygon, find the volume swept when it is repeatedly rotated in 3D about its symmetry axes, which move with it.
Level

Hard9 of 10

Topics
Geometry, Math, Implementation
Solved
No attempts yet

Problem

Grammy loves geometry. Today, she takes out her precious convex polygon and plays with it.

Grammy thinks that symmetry is a fun characteristic for a convex polygon, so she draws out all the axes of symmetry on the polygon.

NIO is a naughty boy. He repeats the following operation several times. In each operation, he chooses an axis of symmetry as the rotation axis and rotates the polygon in three-dimensional space around that axis by an arbitrary angle. The axes of symmetry rotate together with the polygon.

Grammy wants to know the total volume swept by the convex polygon during NIO's operations. Please help her.

Input

The first line contains an integer nn (3≤n≤1053 \leq n \leq 10^5), the number of vertices of the convex polygon.

Each of the next nn lines contains two integers xix_i and yiy_i (−109≤xi,yi≤109-10^9 \leq x_i, y_i \leq 10^9), the coordinates of the ii-th vertex. The vertices are given in counterclockwise order. No three vertices lie on the same line.

Output

Output a real number, the volume of the swept region. The answer is correct if the absolute or relative error is less than 10−610^{-6}.

Examples2

  1. Example 1

    Input
    3
    0 -1
    1 0
    0 1
    
    Expected output
    1.047197551197
    
  2. Example 2

    Input
    3
    1 1
    4 5
    1 4
    
    Expected output
    0