Uva 10221

Summary
Basic geometry problem.

Explanation
To calculate the arc distance use angle = arc/redius. To calculate chord distance use angle = arccos ((x^2 + y^2 - z^2) / 2xy).

Gotcha's

 * Don't forget to convert degrees and minutes to radian.
 * Careful when angle is greater than 180 degree.

Input
500 30 deg 700 60 min 200 45 deg 500 200 deg

Output
3633.775503 3592.408346 124.616509 124.614927 5215.043805 5082.035982 19380.136014 13669.131612