Shots at Walls
A new pistol is being tested. The pistol can fire shots with variant bullet speeds. In some points of time shots are fired from the point of origin with certain horizontal speeds, and in some other points of time walls are built on a horizontal platform. The walls are non-singular segments lying on lines that do not go through the point of origin. The walls may intersect. For processing of the test results, you are to determine the time that each shot bullet had been flying for. You can assume that the speed of the bullet after shot is constant.
Input
Each line of the input begins with either "shot", "wall", or "end" (without quotes). The number of lines doesn't exceed 50000. After "shot", the two coordinates of speed of the bullet are listed; the speed cannot be zero. After "wall", the four numbers follow, being the coordinates of wall's beginning and end. "end" denotes the end of the input. All the coordinates are integers whose absolute values doesn't exceed 10000. All the events are listed in chronological order, and time intervals between the events exceed the time needed to build a wall, or the time needed for bullet to reach the next wall or end of the proving ground.
Output
For each of the shots, you must output the single number, on a line by itself: the time that the bullet had been flying for, with precision of 10^{−6}. If the bullet doesn't hit any wall, you must output "Infinite" instead of a number.