Two star-crossed lovers want to meet. The two lovers stand at distinct points in the plane. They can travel freely except that there is a single wall which cannot be crossed. The wall is a line segment parallel to either the $x$ or the $y$ axis. Each lover can move 1 unit in 1 second. How long will it take them to be together if they both choose the best path?
Each test case consists of two lines, each containing four integers. On the first line, the first two integers give the $x$ and $y$ coordinates of the first lover, and the next two give the $x$ and $y$ coordinates of the second lover. The four integers on the second line give the start and end points of the wall.
In all cases both lovers lie off the (infinite) line containing the wall — that is, the wall extended in both directions. All coordinates are positive and at most $10000$, and neither lover starts on the wall. The input is terminated by a line containing four zeroes.
For each test case, output the minimum time in seconds for the two lovers to meet. Print the answer to exactly 3 decimal places, with each line in the format:
Case n: t
where $n$ is the 1-based test-case number and $t$ is the minimum time.