#P5476. Explore Track of Point

Explore Track of Point

Problem Description

In Geometry, the problem of track is very interesting. Because in some cases, the track of point may be beautiful curve. For example, in polar Coordinate system, $\rho = \cos 3\theta$ is like rose, $\rho = 1 - \sin \theta$ is a Cardioid, and so on. Today, there is a simple problem about it which you need to solve.

Give you a triangle $\Delta ABC$ and AB = AC. M is the midpoint of BC. Point P is in $\Delta ABC$ and makes $min\{\angle MPB + \angle APC, \angle MPC + \angle APB\}$ maximum. The track of P is $\Gamma$. Would you mind calculating the length of $\Gamma$?

Given the coordinate of A, B, C, please output the length of $\Gamma$.

Input

There are T ($1 \leq T \leq 10^4$) test cases. For each case, one line includes six integers the coordinate of A, B, C in order. It is guaranteed that AB = AC and three points are not collinear. All coordinates do not exceed $10^4$ by absolute value.

Output

For each case, first please output "Case #k: ", k is the number of test case. See sample output for more detail. Then, please output the length of $\Gamma$ with exactly 4 digits after the decimal point.

1 0 1 -1 0 1 0
Case #1: 3.2214