A UFO has the shape of a disc with radius . Currently, its center is at point . It needs to move its center to point as quickly as possible. However, the clever inhabitants of Earth have grown suspicious and built a radar at point with detection radius , which will detect the UFO if any part of it enters the radar's range. Due to the construction features of this UFO model, it cannot change altitude and always remains in a horizontal position. Determine the length of the shortest path by which the UFO can move from to without any part of it being detected by the radar.
The first line contains (1 \leq T \leq 1000) — the number of test cases. The next lines each contain eight integers x_A, y_A, x_B, y_B, x_C, y_C, , and (-1000 \leq x_A, y_A, x_B, y_B, x_C, y_C \leq 1000; 0 \leq r, R \leq 1000) — the coordinates of points , , and , as well as the radii of the UFO and the radar. It is guaranteed that the UFO at points and does not intersect the radar's detection zone.
For each test case, print a single real number — the length of the shortest path, rounded to two decimal places.
Example 1