You must pilot a helicopter to deliver supplies to several submarines moving across the ocean.
You are given the coordinates of the helicopter base and of each submarine. Submarine $i$ moves at the constant velocity given by the vector $(v_x, v_y)$: after one hour it has moved $v_x$ km along the x-axis and $v_y$ km along the y-axis ($v_x$ and $v_y$ may be negative). The length of this vector is the submarine's speed.
The helicopter moves at a constant speed in any direction (assume that acceleration and deceleration are instantaneous). It must land on each submarine at least once, and every stop takes exactly one hour to unload supplies and refuel. A submarine surfaces at its scheduled landing time and submerges again once the helicopter leaves; a submarine's velocity is never affected by its depth. While the helicopter waits during that one-hour stop it stays on the submarine, so it moves together with the submarine at the submarine's constant velocity. The helicopter can carry enough supplies for every submarine at once, so it never has to go back to the base during the mission.
All coordinates are in km and all speeds are in km/h.
Find the shortest possible time for the helicopter to start at the base, deliver supplies to every submarine, and return to the base.
The input contains several test cases.
Each test case begins with a line containing an integer $N$ ($1 \le N \le 8$), the number of submarines. Each of the next $N$ lines contains four integers separated by spaces: the initial coordinates $x$ and $y$ of that submarine followed by its velocity components $v_x$ and $v_y$. The final line of the test case contains three integers: the $x$ and $y$ coordinates of the helicopter base and the helicopter's speed.
The input ends with a test case whose first line is $N = 0$; do not process that case.
Every integer in the input has absolute value at most $1000$. The helicopter is always strictly faster than every submarine. The paths of the submarines may cross one another or even pass through the base, but because they can change depth there are never any collisions.
For each test case, print its case number followed by the minimum time required to complete the mission, in the format:
Case a: b hour(s) c minute(s) d second(s)
where $a$, $b$, $c$, and $d$ are non-negative integers and $c$ and $d$ are at most $59$. Round the time up to the next whole second.