403396: GYM101149 K Revenge of the Dragon

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

K. Revenge of the Dragontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

One fairy king hated dragons to death. He gathered a big army and killed every single one of them. But he overlooked a small dragon egg, thinking it was a stone, and the last dragon hatched from this egg soon. Quickly determined who is responsible of the genocide of dragons, the last dragon got angry and destroyed all the kingdom. There was no army to defend from him as it was all spent to annihilate other dragons.

A fairy kingdom is a coordinate plane. The king with the remains of his army took shelter in a palace located in the point . The palace is securely defended, and the dragon can't destroy it. Realized that, the dragon hid in the point , hoping to attack the king when he comes out of the palace. The king soon learned where the dragon is hiding and tries to estimate the danger of the situation.

If the king is out of the palace, the dragon can notice it at any moment and fly towards him from his lair. It will be spotted by the king's guards immediately, and the king will immediately move straight to the palace, uniformly, until he gets safe behind its walls. The dragon is looking for revenge, so every moment of time he uniformly moves straight to the current king's location. The king is quite old, while the dragon is full of strength, so the speed of the king is twice slower than the speed of the dragon. The king wants to estimate to what extent the dragon infringes the freedom of his movements, so he would like to know the area of the safe part of the plane, where he can walk without fears that the dragon can catch him earlier than he reaches the palace.

Input

The first line contains two space-separated integers: xp and yp ( - 1000 ≤ xp, yp ≤  + 1000) — the coordinates of the palace.

The second line contains two space-separated integers: xd and yd ( - 1000 ≤ xd, yd ≤  + 1000) — the coordinates of the dragon's lair.

These two points don't coincide.

Output

Output a single floating-point number — the area of the safe part of the plane. The absolute of relative error must not exceed 10 - 6.

ExampleInput
0 0
1 0
Output
0.916297857297023

加入题单

算法标签: