Camera Observation#1832

Camera Observation

2 seconds
256 megabytes
Very hard

At point is a camera. Its goal is to observe a moving object traveling by bicycle from point to point along a straight line. The camera can "see" the object instantly along a straight trajectory, but its line of sight cannot pass through the interior of any buildings. There are skyscrapers in the form of parallelepipeds acting as obstacles. The camera wants to observe the moving object as soon as possible. Your task is to determine the coordinates of the object at the moment it is first visible to the camera.

Input

The first line contains the coordinates of : , , (sz \geq 0), separated by spaces.

The second line contains the coordinates of points and : , , , , separated by spaces. The -coordinate of the moving object throughout its movement is always zero.

Next, (0 \leq N \leq 1000) lines follow, each containing , , , , (lx < rx, ly < ry, h > 0) — the coordinates of the two opposite corners of the base of each building and its height. The sides of skyscrapers are parallel to the axes of the Cartesian coordinate system.

All coordinates and heights are integers and do not exceed by absolute value. It is guaranteed that no two buildings share any points, the segment does not intersect with any building, and is not inside any building.

Output

If it is impossible for the camera to observe the object (the line of sight is always blocked), output Impossible. Otherwise, output the coordinates of the object at the first moment it becomes visible, with an accuracy of 10^{-7}.

Examples

Example 1

Loading
Loading