Tudor is going on vacation!
While Tudor is on vacation, he decides to take his goat and tie to a fence post with a rope. Because he doesn't want to infringe too many on the goat's freedom to trample on the earth, he wants the rope to be as long as possible. However, because he doesn't feel like dealing with property damage, he doesn't want the goat to be able to run into his house.
Tudor's house is modeled as an axis-aligned rectangle with corners at and , and the fence post is at .
Compute the length of the longest rope such that the goat cannot reach Tudor's house.
will not fall inside the axis-aligned rectangle with corners at and .
There are no explicit subtasks for this problem. There will be 15 secret test cases, each worth one mark.
The input will consist of six space-separated integers, , , , , , .
Output, on a single line, the maximum length of rope Tudor can use. This number must be rounded to three decimal places.
7 4 0 0 5 4
6 0 0 2 7 6
4 8 7 8 9 9