A ship named Prometheus disappeared in the Atlantic Ocean for unknown reasons. Not a single clue was even found about the ship. This is not the first time, five more ships from different countries have also disappeared in the same region before.
ACM (Artificially Correct Mathematicians) are known for their exclusive service using Artificial Intelligence. They don’t do any physical operations. Instead, they use special devices powered by AI. They are currently investigating the ship disappearances.
To investigate, they have identified a triangular area (marked red) in the ocean where there is a high probability of finding Prometheus.
To get more precise information, they have placed three beacons , and (marked blue)
on the triangle’s vertices.
After that, they placed their AI radar from space exactly at the point (marked yellow)
,
which will inform them about anomalies in the circular area (marked green)
that falls in its search radius.
Note:
Point is the midpoint of .
, and always will be on the border of the radar’s range.
It is guaranteed that always .
The anomalies only occur within the triangular area covered by beacons , , and .
However, the AI radar is not only monitoring the triangular area but also the entire circular area within its radius. So, if the above picture and the notes are observed it can be seen that is the diameter of the radar’s range.
ACM has limited funds for this task. So they want to cut costs and find alternatives. Before approval, the corporation wants to know how much area is monitored where no anomalies will occur (marked green)
.
Now, you are given , which are the distance between beacons and , and and respectively. Find the total area that is monitored where no anomalies will occur (marked green)
.
Some important formulas to be noted:
Area of a right-angled triangle = .
For a right-angled triangle, .
Area of a circle = .
Use for this problem.
The input will contain two positive integers and — denoting the distance between beacons and , and and respectively.
Print the total area that is monitored where no anomalies will occur (marked green)
.
Print digits after the decimal point.
Input | Output |
---|---|
4 7 | 37.051000 |
Input | Output |
---|---|
100 100 | 10708.000000 |
Use double data type for this problem.