C. Polar map
time limit per test
8 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

See PDF statement in attachment.

Examples
Input
3
45 0
-45 0
0 90
Output
0.269064434316
Input
6
0 90
0 180
0 -90
80 -90
80 180
80 90
Output
0.389591701512
Input
3
-85 0
-85 179
0 90
Output
0.207400294880