To award the winners of the olympiad, it has been decided to build a new stage. The award ceremony will take place in a circus, so the stage must be a triangle that lies inside an arena — a circle of radius $$$r$$$. The bases of the stage are the vertices of the given triangle.
On the circumference — the boundary of the circle — three non-intersecting arcs are designated. It has been decided that exactly one base of the stage should lie on each arc.
The organizers want to make the stage as large as possible in area, and you must help them by determining what the maximum area can be.
Below is an example of the stage for the test cases from the example:
In the figure, the designated arcs are shown with bold lines, and the optimal stage is shown with dashed lines.
The first line contains a single real number $$$r$$$ — the radius of the circle ($$$1 \le r \le 100$$$).
The second line describes the arcs. Fix an arbitrary radius vector of the given circle, and we will consider its direction as zero. Each arc is described by two real numbers: the angles in radians by which the given radius vector must be rotated counterclockwise so that its end points to the ends of the arc.
Thus, six real numbers $$$a_1, a_2, b_1, b_2, c_1, c_2$$$ are given — the angles that define the ends of the three given arcs ($$$0 \le a_1 < a_2 < b_1 < b_2 < c_1 < c_2 \le 2 \cdot \pi$$$).
You need to output a single real number — the maximum area of the stage.
The answer must be output with an absolute or relative error of at least $$$10^{-6}$$$. In other words, if the correct answer is $$$a$$$, and your output is $$$b$$$, the condition $$$\frac{|a-b|}{\max(|a|,1)} \le 10^{-6}$$$ must hold.
50.0 1.570796 2.356194 3.926991 4.712389 5.497787
32.4759526419