Special Judge Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
Andrew lives at countryside. The area he lives at has two bike roads, each of which has the form of a circle with radius r. Roads have no common points.
Andrew’s house is located at one of the roads, and his school is located at the other one. Each day Andrew rides his bike from home to school and back. He has noticed that riding along the road is easier than riding by the ground. When riding along the road Andrew’s speed is u, and when riding by the ground his speed is v. Now Andrew wonders what minimal time he needs to get from his house to school.
Let us introduce the coordinate system so that the center of the bike road where Andrew’s house is located were (0, 0), and the center of the bike road where his school is located were (0, d). The radius of each road is r. Andrew’s house is located at a point (x1, y1), and his school is located at a point (x2, y2). His speed by the road is u, and his speed by the ground is v.
Input file contains eight floating point numbers: d, r, x1
, u and v (1 ≤ r ≤ 100, 2r < d ≤ 100,1 ≤ v < u ≤ 10,). All equalities are up to 10-9.
Output one floating point number — the minimal time Andrew needs to get from his house to school. Your answer must be accurate up to 10-6.
5 0 5 20
-5 0 5 20
Andrew Stankevich Contest 23