Let the goat into the garden 7`
Petro Vasylovych used to let his goats roam freely in his garden, but he wasn't pleased when they trampled his plants. To solve this, he decided to improve their tethering system. Now, each goat's collar is attached to a rope stretched between two trees, allowing them to walk only along the segment connecting these trees.
However, the goats feel lonely wandering alone in the garden and wish to meet and graze together. Can you help them find a way to meet?
Input
The program will receive eight integers as input, each not exceeding in absolute value. The first four integers represent the coordinates of the two trees between which the first goat is tethered. The next four integers represent the coordinates of the trees between which the second goat is tethered. Note that the trees may coincide, including the possibility that the ends of one tether overlap.
Output
If the goats cannot meet, output the word "Empty". If they can meet at exactly one point, output two numbers representing the coordinates of the intersection point. If the intersection forms a segment, output four numbers representing the coordinates of the two endpoints of the segment, in lexicographical order (i.e., first output the point with the smaller x coordinate, and if the x coordinates are equal, the point with the smaller y coordinate). All numbers should be output with a precision of at least 6 decimal places.