#abc183b. [abc183_b]Billiards
[abc183_b]Billiards
Problem Statement
Takahashi is playing billiards on a two-dimensional plane. The -axis functions as a wall; when a ball hits the axis, it will bounce off the axis so that the angle of incidence equals the angle of reflection.
Takahashi's ball is now at . When he strikes the ball aiming for some point, it will roll in a straight line towards that point.
To make the ball hit the -axis exactly once and then pass , where along the -axis should he aim for?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Let be the point Takahashi should aim for. Print .
Your output will be considered correct when its absolute or relative error from our answer is at most .
Sample Input 1
1 1 7 2
Sample Output 1
3.0000000000
As shown below, we can make the ball pass by striking it aiming for .
Sample Input 2
1 1 3 2
Sample Output 2
1.6666666667
Sample Input 3
-9 99 -999 9999
Sample Output 3
-18.7058823529
The output will be considered correct when its absolute or relative error from our answer is at most .