The intergalactic war has started! Willie lives in a war zone and he is a soldier who wants to protect his planet. The planet's peacekeepers have gathered intel on the immediate missile launch that may affect Willie's city. This missile launch is composed of two advanced projectiles. There is a secret operation in the planet that Willie lives in. The operation involves extremely reactive substances that may destroy the planet if the two projectiles collide within a specific area. Willie would like to find the collision point of the two projectiles' paths within given boundaries. Due to Willie's dislike for Math and Physics, he has come to you for help.
For simplicity, the universe can be modelled as a 2D plane. The trajectory of each projectile can be modelled as a polynomial function. A collision is defined as a point where the two functions meet and are not tangent to each other. In other words, at a collision point, the two functions have to cross each other and not merely touch. The projectiles will not change course even if they collide because this is a new type of technology. Given the functions that represent the trajectories, find the collision point of the two projectiles within the domain
Input Specification
Line 1:
Line 2:
Line 3:
Line 4:
Line 5:
Output Specification
The first and only line of output contains the value of
Note: If the official answer is
Constraints
For any coefficient
Subtasks
Subtask 1 [10%]
Subtask 2 [20%]
Subtask 3 [70%]
No additional constraints.
Sample Input
1
2 0
1
-1 3
0 3
Sample Output
1.00000000
Comments