eolymp
bolt
Try our new interface for solving problems
Problems

Geometry Problem

Geometry Problem

Peter is studying in the third grade of elementary school. His teacher of geometry often gives him difficult home tasks.

At the last lesson the students were studying circles. They learned how to draw circles with compasses.

Peter has completed most of his homework and now he needs to solve the following problem. He is given two segments. He needs to draw a circle which intersects interior of each segment exactly once.

The circle must intersect the interior of each segment, just touching or passing through the end of the segment is not satisfactory.

Help Peter to complete his homework.

Input

Contains several test cases. Each test case consists of two lines.

The first line of the test case contains four integer numbers x11, y11, x12, y12 - the coordinates of the ends of the first segment. The second line contains x21, y21, x22, y22 and describes the second segment in the same way.

Input is followed by two lines each of which contains four zeroes these lines must not be processed. All coordinates do not exceed 100 by absolute value.

Output

For each test case output three real numbers - the coordinates of the center and the radius of the circle. All output numbers must not exceed 1010 by their absolute values. The jury makes all comparisons of real numbers with the precision of 10-4.

prb8485.gif

Time limit 1 second
Memory limit 128 MiB
Input example #1
0 0 0 4
1 0 1 4
0 0 0 0
0 0 0 0
Output example #1
0.5 0 2
Source 2007 Petrozavodsk, Andrew Stankevich Contest 22, January 27, Problem B