Scholar's Lawn
题号:NC226739
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
Special Judge, 64bit IO Format: %lld

题目描述



Famously at Cambridge, and often copied at other schools, is the tradition of the "Scholar's Lawn" -- an area of grass where Fellows of the school, or other distinguished entities, can walk, but regular students cannot.


So, if a student spies a Fellow walking across campus, and wishes to ambush …, er, meet up with them, the student is restricted to walking along a set of narrow paved walkways laid out in various places within the grassy areas, hoping to reach the Fellow's path at the same time or before the Fellow arrives. At the end of the Fellow's path is the Sacred Grove of Academe, off-limits to students, so if the Fellow reaches it before the student, the student is out of luck.

For instance, Figure 1 shows an area of lawn together with the fixed set of paved walkways (solid lines) and the path taken by a Fellow of the university (dotted line);  and  denote the initial positions of the Fellow and student, respectively. If both travel at the same speed (say, one meter per second), then after  seconds the Fellow will find the student waiting to have a chat at location (marked by the small open circle "o").
                                                                      

输入描述:

Input begins with an integer , the number of straight-line walkways. There will then follow  lines, each with  integers, denoting the  coordinates of the endpoints of each walkway. After that is a line containing three real values  , where  is the position of the student and , is the student's walking speed. The point  is guaranteed to lie on one of the paved walkways. The final line contains  numbers. The first  numbers are real numbers , giving the starting position  of the Fellow and the ending position of the Fellow (the last point where the student can reach the Fellow). The final number is a real value , giving the Fellow's walking speed. All real-valued inputs will have at most four digits after the decimal point.

The Fellow always walks in a straight line. The student can walk only along walkways, which are assumed to have zero width. If a walkway intersects with another walkway or the Fellow's path, it will do so at a single point. Collinear walkways never intersect one another; similarly, if the Fellow's path and a walkway are collinear, they will not intersect.

输出描述:

Output the earliest time  when the student's position and the Fellow's position can coincide at an intersection of a walkway and the Fellow's path. If this is impossible, output the word "Impossible". Numeric answers should be accurate to within an absolute or relative error of .
示例1

输入

复制
7
5 5 35 5
35 0 15 20
30 0 30 10
30 10 35 10
35 10 35 15
35 15 30 15
30 15 30 30
30.0 0.0 1.0
10 0 40 30 1.0

输出

复制
17.67766953
示例2

输入

复制
7
5 5 35 5
35 0 15 20
30 0 30 10
30 10 35 10
35 10 35 15
35 15 30 15
30 15 30 30
30.0 0.0 1.0
10 0 40 30 1.2

输出

复制
Impossible