Petya wants to make a paper parallelepiped with dimensions
*A* × *B* × *C*.
He has already produced a surface map of the parallelepiped
(see figure):

On this surface map Petya has marked two points with coordinates
(*x*_{1}, *y*_{1}) and
(*x*_{2}, *y*_{2}).
Can you find the distance between these points after the
parallelepiped is assembled?

### Input

The first line contains integers *A*, *B*, *C*
(1 ≤ *A*, *B*, *C* ≤ 1000).
In the second line there are the coordinates of the first point
(*x*_{1}, *y*_{1}),
and in the third line there are the coordinates of the second point
(*x*_{2}, *y*_{2}).
The numbers *x*_{1}, *x*_{2},
*y*_{1}, *y*_{2}
are given with two fractional digits.
The points (*x*_{1}, *y*_{1}) and
(*x*_{2}, *y*_{2}) are different and
belong to the surface map.

### Output

Output the distance between the marked points after the
parallelepiped is assembled, with accuracy to 10^{−6}.

### Sample

input | output |
---|

2 2 2
3.00 3.00
5.00 5.00 | 1.4142135623730950 |

**Problem Author: **Vladislav Isenbaev, Alexander Toropov

**Problem Source: **XIII-th USU Junior Contest, October 2006