#Lutece0613. Running
Running
Migrated from Lutece 613 Running
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
and are two students in BUPT. They usually go running together. The running route of is always along the runway, just like the one we usually see, is made up by two semicircles and two segments. As shown in the picture.
The segments may degenerate, in other words, the runway maybe a circle. Unfortunately, there’s a monitor near them. Both monitor and people can be regarded as point on two-dimensional surface. The monitor can watch a person if and only if there’s no other one on the segment connecting the monitor and the person. Because don’t wish the monitor to watch , he makes adjustments to his route continuously so that he is always on the segment connecting the monitor and . For the sake of safety, the distance between the monitor and must be Dis at any time. Now you should write a program to calculate how long does run during the lap time of .
Please notice that and are going running instead of any other things, so the positions of them can’t be same at any time.
Input
The first line of input data is a positive integer (), indicating the amount of test cases.
Then cases followed. For each case, the first line is three pairs of integers, the coordinates of centers of the two semicircle of runway of , and the coordinate of the monitor.
The second line is two positive integer and , the radius of the semicircle and the distance between and the monitor.
The absolute values of all integers are not more than .
Output
For each test case, print one line.
If cannot prevent the monitor from watching , print ”It is life.”(without quotes).
Otherwise, print the length of ’s running, round to two decimal places.
For more details, see the sample.
Samples
2
0 0 0 0 0 1
1 1
0 0 0 0 2 2
1 1
It is life.
1.45
Resources
6th BUPT Programming Contest Final