eolymp
bolt
Try our new interface for solving problems
Problems

Sniper

Sniper

Time limit 2 seconds
Memory limit 256 MiB

At the point S is a sniper. His goal - to remove enemy state who rides a bicycle from point A to point B in a straight line. Bullet flies well in a straight trajectory with infinite speed. At the scene located N of skyscrapers in the form of parallelepipeds. The trajectory of the bullet can not intersect the interior of buildings. And yes, of course, a sniper seeking to make a fatal shot as soon as possible. Your task - to determine the coordinates of the enemy in time of the shot.

Input data

The first line contains the coordinates of S: sx, sy, sz (sz0), separated by one space. The second line contains the coordinates of points A and B: ax, ay, bx, by, separated by a space. z-coordinate of the cyclist during the entire movement is zero. Follow N (0N1000) lines contain numbers separated by a space, lx, ly, rx, ry, h (lx < rx, ly < ry, h > 0) — coordinates of the opposite ends of the base of the building and its height. Sides of skyscrapers are parallel to the axes of a Cartesian coordinate system. All the coordinates and altitude - whole and do not exceed the absolute value of 100. It is guaranteed that no two buildings have no common points, the segment AB does not intersect with the buildings, S does not belong to any of the box.

Output data

If the enemy can not be removed, output "Impossible". Otherwise, output the coordinates of an enemy state in time of the murder with an accuracy of 10^{-7}.

Examples

Input example #1
0 0 2
-4 4 4 4
2
-3 2 -1 3 10
1 -1 4 2 20
Output example #1
-1.3333333333 4.0000000000
Author Stanislav Pak
Source Winter School, Kharkov, 2011, Day 1