How Lader 

Lader is a game that is played in a regular hexagonal board (all sides equal, all angles are also equal). The game is much similar as pool game. But there is only one hole that is situated in the center of the hexagon. The position of the board is given by a 2D co-ordinate system. The top and bottom sides of the hexagon are parallel to x axis. The center of the hexagonal board is situated at (0,0).


$\textstyle \parbox{.5\textwidth}{
\begin{center}
\mbox{}
\epsfbox{p12617a.eps}
\end{center}}$$\textstyle \parbox{.49\textwidth}{
\begin{center}
\mbox{}
\epsfbox{p12617b.eps}
\end{center}}$

You are trying to hit the ball B1 and the direction of hitting is from B1 to B2. After you have hit the ball B1, it starts reflecting on the walls of the hexagonal Lader board. The initial speed of the ball is given. When a ball hits a wall, its speed decreases by 1 unit/second. The ball stops when its' speed becomes $ \le$ 0 unit/second.

You have to determine the final speed of the ball when it falls through the hole. If the ball stops before reaching the hole, print `Stops'. In this problem assume the followings:

  1. There is no loss of speed while rolling freely on the board.
  2. The radius of the ball is so small that you can consider it as a point.
  3. You may consider the ball fallen in the hole, if at any point the ball is situated at a distance closer than r + 10-6 units from the center of the hole, where r is the radius of the hole.
  4. The reflection happens according to the standard reflection rule (incident angle = reflection angle, with respect to the side of the hexagon) except for the case when it hits the corner. That case is described in 5-th rule.
  5. If a ball reaches at the corner (intersection point of two sides), its speed decreases by 2 (it is assumed that it hits both the walls) and it comes back along the line it hits that corner. If a ball with speed 1 hits the corner, it stops there.

The picture on the right above shows the movements of a ball on a Lader board. The numbers written denote the order of appearance.

Input 

The first line of the input denotes T ( 1$ \le$T$ \le$150), the number of test cases to follow. Each test case consists of a 6 integers, s ( 0 < s < 150), x1, y1, x2, y2, r, t ( 1$ \le$t$ \le$500). Here, s denotes the length of sides of the hexagon centered at (0,0).

(x1, y1) and (x2, y2) denote the position of ball B1 and ball B2 respectively. The balls will be strictly inside the hexagonal board. r denotes the radius of the hole, centered at (0,0). The hole resides strictly inside the hexagonal board. t denotes the initial speed of the ball.

Output 

For each input, you have to print the case number first, followed by the terminal speed when it falls in the hole. If the ball stops before falling in the hole, print `Stops'.

Sample Input 

4
80 10 0 20 0 5 200
51 7 4 0 9 5 1
55 -5 8 -6 7 8 104
12 1 0 0 -1 1 271

Sample Output 

Case 1: 198
Case 2: Stops
Case 3: 99


Problemsetter: Anna Fariha
Special Thanks: Md. Mahbubul Hasan