Crossing
Mr. 01011 is in FiboLandia and aims to reach BitLandia as quickly as possible, while also determining the distance he swam. These two cities are situated on opposite banks of the enigmatic cubic river Astromera, which is d meters wide. The speed of travel along the shore is v[1]
m/s, and the swimming speed across the river Astromera is v[2]
m/s.
Input
Each test case consists of three real numbers: d (0 < d < 10^9
), v[1]
, v[2]
(0 < v[1]
, v[2]
< 10^9
), along with the coordinates of FiboLandia and BitLandia given as (x, y), where x and y are real numbers, with y = 0 or y = d (indicating that the cities are precisely on the riverbanks). It is also known that all coordinates satisfy 0 ≤ x, y ≤ 10^6
.
Output
Output two real numbers: the time taken to reach the destination and the distance Mr. 01011 swam, with an absolute or relative error of 10^(-6)
. If there are multiple paths that result in the minimum time, select the one where the distance swam by Mr. 01011 is the greatest.