Welcome to ZOJ
 Problem Sets Information Select Problem Runs Ranklist
ZOJ Problem Set - 3716
Ribbon Gymnastics

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

Robert is a gymnastics coach. Unfortunately, he got four gymnastics beginners to attend the coming competition. Since the competition has a nice award, Robert will make all his effort to win the competition.

One performance requires that each of the four player should take a ribbon and rotate herself, and assume the ribbons will then straighten out. Since Robert's four players are beginners, Robert cannot control the actual rotating speeds of four players during the competition. And when two ribbons touch, they may wind, which will cause players felling down. For safety, Robert should avoid this. Four distinct points will be given as xi yi before the competition begins. Players should stand at those points when rotating.

The longer the ribbons are, the more bonus Robert will gain. After knowing the four points Robert can choose ribbons and points for each player. The length of each ribbon should be positive. So help Robert to find the maximal total lengths of the four ribbons.

#### Input

There will be multiple test cases.Please process to the end of input.

Each test case contains four lines.

Each line contains two integers xi (-10^8≤xi≤10^8) and yi (-10^8≤yi≤10^8).

#### Output

Output the total maximal sum of the lengths of the four ribbons. Answer having an absolute or relative error less than 1e-6 will be accepted.

```0 0
0 3
4 0
4 3
```

#### Sample Output

```6.00000000
```

Author: YANG, Jueji
Contest: ZOJ Monthly, June 2013
Submit    Status