445. Dig or Climb
Time limit per test: 0.25
second(s)
Memory limit: 262144 kilobytes
input: standard
output: standard
Benjamin Forest VIII is a king of a country.
One of his best friends Nod lives in a village far from his castle.
Nod gets seriously sick and is on the verge of death.
Benjamin orders his subordinate Red to bring good medicine for him as soon as possible.
However, there is no road from the castle to the village.
Therefore, Red needs to climb over mountains and across canyons to reach the village.
He has decided to get to the village on the shortest path on a map, that is, he will move on the straight line between the castle and the village.
Then his way can be considered as polyline with
n points (
x_{1},
y_{1})... (
x_{n},
y_{n}) as illustlated in the following figure.
Here,
x_{i} and
y_{i} are coordinates of point
i.
The castle is located on the point (
x_{1},
y_{1}), and the village is located on the point (
x_{n},
y_{n}).
Red can walk with speed
v_{w}.
Also, since he has a skill to cut a tunnel through a mountain horizontally,
he can move strictly inside the mountain with speed
v_{c}.
Your job is to write a program to find the minimum time to get to the village.
Input
The input is given in the following format:
n
v_{w} v_{c}
x_{1} y_{1}
...
x_{n} y_{n}
You may assume all the following:
1 ≤
n ≤ 1000, 1 ≤
v_{w},
v_{c} ≤ 10,
10000 ≤
x_{i},
y_{i} ≤ 10000, and
x_{i} <
x_{j} for all
i <
j.
Output
You should print the minimum time required to get to the village in a line.
Each minimum time should be given as a decimal with an arbitrary number of fractional digits and with an absolute error of at most 10
^{6}.
Example(s)
sample input

sample output

3
2 1
0 0
50 50
100 0

70.710678

sample input

sample output

3
1 1
0 0
50 50
100 0

100.000000

sample input

sample output

3
1 2
0 0
50 50
100 0

50.000000

sample input

sample output

3
2 1
0 0
100 100
150 50

106.066017

sample input

sample output

6
1 2
0 0
50 50
100 0
150 0
200 50
250 0

150.000000

sample input

sample output

2
1 2
0 0
100 0

100.000000
