atcoder#ABC246B. [ABC246B] Get Closer
[ABC246B] Get Closer
Score : points
Problem Statement
From the point in a two-dimensional plane, let us move the distance of toward the point . Find our coordinates after the move.
Here, after moving the distance of from a point to a point ( length of the segment ), we are at the point on the segment whose distance from is . The Constraints guarantee that the distance between the points and is at least .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Let be our coordinates after the move. Print and in this order, separated by a space. Your output is considered correct when, for each printed value, the absolute or relative error from the judge's answer is at most .
3 4
0.600000000000 0.800000000000
Printing 0.5999999999 0.8000000001
, for example, would also be accepted.
1 0
1.000000000000 0.000000000000
We may arrive at .
246 402
0.521964870245 0.852966983083