UVa 10451 - Ancient Village Sports

10451 - Ancient Village Sports
http://acm.uva.es/p/v104/10451.html

Summary
You are given the area of the polygon. You'll have to find area for spectators = area of the outer circle - area of the polygon area for officials = area of the polygon - area of the inner circle remember $$\pi = 2 \cos^{-1}(0)$$ and your output should be rounded currect to 5 decimal points.

Explanation
Find the area of the small triangle made up the polygon (see UVa 10432) from there you can find the area of the outer circle and you can find the area of the inner circle through this formula:

$$ a = \mbox{area of the inner circle} $$

$$ A = \mbox{Area of the polygon} $$

$$ N = \mbox{number of sides} $$

$$ a = \frac{A}{ ( N \tan( \frac{\pi}{N} ) ) } $$

Sample Input
3 0.43301 6 2.59808 9 6.18182 0 2.33333

Sample Output
Case 1: 0.61418 0.17121 Case 2: 0.54352 0.24188 Case 3: 0.53226 0.25314