Our base recently developed a robot combating system. The combating system contains two straight tracks with finite non-negative length in 2D plane (say AB and CD). There is one robot in each of them, and each robot can move freely on the track. When the two robots are combating, they can disturb each other by sending radio-waves to each other. Sometimes they want to defend, and sometimes they want to offense, so each robot are very concerned with the distance between them. As an administrator of this system, please calculate the maximum possible distance and the minimum possible distance between two robots.
The input contains multiple cases terminated with EOF.
Each case has only one line with 8 integers (absolute value not exceeding 100)
—— coordinate of the end points of two tracks:
XA YA XB YB XC YC XD YD
The output of each case should have one line, containing two numbers, with 3 digits after the dot:
Case #i: max_distance min_distance