Problem: 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 (x1, y1) . . . (xn , yn ) as illustlated in the following figure.

<image>

Figure 1: An example route from the castle to the village

Here, xi indicates the distance between the castle and the point i, as the crow flies, and yi indicates the height of the point i. The castle is located on the point (x1 , y1 ), and the village is located on the point (xn , yn).

Red can walk in speed vw . Also, since he has a skill to cut a tunnel through a mountain horizontally, he can move inside the mountain in speed vc.

Your job is to write a program to the minimum time to get to the village.



Input

The input is a sequence of datasets. Each dataset is given in the following format:


n
vw vc
x1 y1
...
xn yn


You may assume all the following: n ≤ 1,000, 1 ≤ vw, vc ≤ 10, -10,000 ≤ xi, yi ≤ 10,000, and xi < xj for all i < j.

The input is terminated in case of n = 0. This is not part of any datasets and thus should not be processed.

Output

For each dataset, 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 . No extra space or character is allowed.

Example

Input

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


Output

70.710678
100.000000
50.000000
106.066017
150.000000

Solution (in CPP):

Solution:
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const double EPS = 1.0e-10;

class Point
{
public:
    double y, x;
    Point(){
        y = x = 0.0;
    }
    Point(double y0, double x0){
        y = y0;
        x = x0;
    }
    Point operator+(const Point& p) const{
        return Point(y + p.y, x + p.x);
    }
    Point operator-(const Point& p) const{
        return Point(y - p.y, x - p.x);
    }
    Point operator*(double a) const{
        return Point(y * a, x * a);
    }
    Point operator/(double a) const{
        return Point(y / a, x / a);
    }
    double length() const{
        return sqrt(y * y + x * x);
    }
    double dist(const Point& p) const{
        return sqrt(pow(y - p.y, 2) + pow(x - p.x, 2));
    }
};

class Edge{
public:
    int to;
    double time;
    Edge(){}
    Edge(int to0, double time0){
        to = to0;
        time = time0;
    }
};

int n;
double vw, vc;
vector<Point> p;

void dig(vector<vector<Edge> >& edges)
{
    edges.assign(n, vector<Edge>(0));

    for(int a=0; a<2; ++a){
        stack<pair<double, int> > stk;
        stk.push(make_pair(-DBL_MAX, -1));

        for(int i=0; i<n; ++i){
            while(p[i].y < stk.top().first - EPS)
                stk.pop();

            int j = stk.top().second;
            if(j != -1 && j != i-1){
                double t = (p[i].y - p[j].y) / (p[j+1].y - p[j].y);
                Point q = p[j] * (1-t) + p[j+1] * t;
                if(a == 0)
                    edges[j].push_back(Edge(i, p[j].dist(q) / vw + q.dist(p[i]) / vc));
                else
                    edges[n-1-i].push_back(Edge(n-1-j, p[j].dist(q) / vw + q.dist(p[i]) / vc));
            }

            stk.push(make_pair(p[i].y, i));
        }

        reverse(p.begin(), p.end());
    }
}

int main()
{
    for(;;){
        cin >> n;
        if(n == 0)
            return 0;

        cin >> vw >> vc;

        p.resize(n);
        for(int i=0; i<n; ++i)
            cin >> p[i].x >> p[i].y;

        vector<vector<Edge> > edges;
        dig(edges);

        vector<double> dp(n, DBL_MAX);
        dp[0] = 0.0;
        for(int i=0; i<n-1; ++i){
            dp[i+1] = min(dp[i+1], dp[i] + p[i].dist(p[i+1]) / vw);
            for(unsigned j=0; j<edges[i].size(); ++j)
                dp[edges[i][j].to] = min(dp[edges[i][j].to], dp[i] + edges[i][j].time);
        }

        printf("%.10f\n", dp[n-1]);
    }
}