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 <iostream>
#include <iomanip>
#include <complex>
#include <vector>
#include <algorithm>
#include <cmath>
#include <array>
#include <map>
#include <queue>
using namespace std;
const double EPS = 1e-6;
const double INF = 1e12;
const double PI = acos(-1);
#define EQ(n,m) (abs((n)-(m)) < EPS)
#define X real()
#define Y imag()

typedef complex<double> P;
typedef vector<P> VP;
struct L : array<P, 2>{
    L(const P& a, const P& b){ at(0)=a; at(1)=b; }
    L(){}
};

namespace std{
    bool operator < (const P& a, const P& b){
        return !EQ(a.X,b.X) ? a.X<b.X : a.Y+EPS<b.Y;
    }
    bool operator == (const P& a, const P& b){
        return abs(a-b) < EPS;
    }
}

double dot(P a, P b){
    return (conj(a)*b).X;
}
double cross(P a, P b){
    return (conj(a)*b).Y;
}
int ccw(P a, P b, P c){
    b -= a;
    c -= a;
    if(cross(b,c) > EPS) return +1; //ccw
    if(cross(b,c) < -EPS) return -1; //cw
    if(dot(b,c) < -EPS) return +2; //c-a-b
    if(abs(c)-abs(b) > EPS) return -2; //a-b-c
    return 0; //a-c-b
}

bool intersectSS(const L& a, const L& b){
    return ( ccw(a[0],a[1],b[0]) *ccw(a[0],a[1],b[1]) <= 0 ) &&
        ( ccw(b[0],b[1],a[0]) *ccw(b[0],b[1],a[1]) <= 0 );
}
bool intersectSP(const L& s, const P &p){
    return abs(cross(s[0]-p, s[1]-p))<EPS  && dot(s[0]-p, s[1]-p)<EPS;
}

bool isParallel(const P &a, const P &b){
    return abs(cross(a,b)) < EPS;
}
bool isParallel(const L &a, const L &b){
    return isParallel(a[1]-a[0], b[1]-b[0]);
}
P crosspointLL(const L &l, const L &m) {
  double A = cross(l[1]-l[0], m[1]-m[0]);
  double B = cross(l[1]-l[0], l[1]-m[0]);
  return m[0] + B/A *(m[1]-m[0]);
}

int in_poly(const P &p, const VP &poly){
    int n = poly.size();
    int ret = -1;
    for(int i=0; i<n; i++){
        P a = poly[i]-p;
        P b = poly[(i+1)%n]-p;
        if(a.Y > b.Y) swap(a,b);
        if(intersectSP(L(a,b), P(0,0))) return 0;
        if(a.Y<=0 && b.Y>0 && cross(a,b)<0) ret = -ret;
    }
    return ret;
}

pair<vector<vector<int> >, VP> arrangement(const vector<L> &l){
    vector<VP> cp(l.size());
    VP plist;
    for(int i=0; i<(int)l.size(); i++){
        for(int j=i+1; j<(int)l.size(); j++){
            if(!isParallel(l[i], l[j]) && intersectSS(l[i], l[j])){
                P cpij = crosspointLL(l[i], l[j]);
                cp[i].push_back(cpij);
                cp[j].push_back(cpij);
                plist.push_back(cpij);
            }
        }
        cp[i].push_back(l[i][0]);
        cp[i].push_back(l[i][1]);
        plist.push_back(l[i][0]);
        plist.push_back(l[i][1]);
        sort(cp[i].begin(), cp[i].end());
        cp[i].erase(unique(cp[i].begin(), cp[i].end()), cp[i].end());
    }
    sort(plist.begin(), plist.end());
    plist.erase(unique(plist.begin(), plist.end()), plist.end());

    int n = plist.size();
    map<P, int> conv;
    for(int i=0; i<n; i++){
        conv[plist[i]] = i;
    }
    vector<vector<int> > adj(n);
    for(int i=0; i<(int)cp.size(); i++){
        for(int j=0; j<(int)cp[i].size()-1; j++){
            int jidx = conv[cp[i][j]];
            int jp1idx = conv[cp[i][j+1]];
            adj[jidx].push_back(jp1idx);
            adj[jp1idx].push_back(jidx);
        }
    }
    for(int i=0; i<n; i++){
        sort(adj[i].begin(), adj[i].end());
        adj[i].erase(unique(adj[i].begin(), adj[i].end()), adj[i].end());
    }
    return make_pair(adj, plist);
}


int main(){
    while(1){
        int n;
        cin >> n;
        if(n == 0) break;

        double vw,vc;
        cin >> vw >> vc;
        VP p(n);
        for(int i=0; i<n; i++){
            double x,y;
            cin >> x >> y;
            p[i] = P(x, y);
        }
        double xmin = p[0].X, xmax = p[n-1].X;
        VP poly = p;
        reverse(poly.begin(), poly.end());
        poly.push_back(P(xmin, -2e4));
        poly.push_back(P(xmax, -2e4));

        vector<L> l;
        for(int i=0; i<n; i++){
            if(i != n-1){
                l.push_back(L(p[i], p[i+1]));
            }
            double y = p[i].Y;
            L cut(P(xmin, y), P(xmax, y));
            VP cp;
            for(int j=0; j<n-1; j++){
                L edge(p[j], p[j+1]);
                if(!isParallel(cut, edge) && intersectSS(cut, edge)){
                    cp.push_back(crosspointLL(cut, edge));
                }
            }
            cp.erase(unique(cp.begin(), cp.end()), cp.end());
            int idx = lower_bound(cp.begin(), cp.end(), p[i]) -cp.begin();
            if(idx == (int)cp.size() || !(cp[idx] == p[i])){
                continue;
            }
            if(i > 0 && p[i-1].Y > p[i].Y +EPS && idx > 0){
                l.push_back(L(cp[idx-1], cp[idx]));
            }
            if(i < n-1 && p[i].Y +EPS < p[i+1].Y && idx < (int)cp.size()-1){
                l.push_back(L(cp[idx], cp[idx+1]));
            }
        }
        sort(l.begin(), l.end());
        l.erase(unique(l.begin(), l.end()), l.end());
        pair<vector<vector<int> >, VP> ret = arrangement(l);
        vector<vector<int> > &adj = ret.first;
        VP &plist = ret.second;

        vector<vector<pair<int, double> > > adj2(adj.size());
        for(int i=0; i<(int)adj.size(); i++){
            adj2[i].resize(adj[i].size());
            for(int j=0; j<(int)adj[i].size(); j++){
                P mid = (plist[i] +plist[adj[i][j]])/2.0;
                double cost;
                if(in_poly(mid, poly) == 1){
                    cost = abs(plist[i] -plist[adj[i][j]]) /vc;
                }else{
                    cost = abs(plist[i] -plist[adj[i][j]]) /vw;
                }
                adj2[i][j] = make_pair(adj[i][j], cost);
            }
        }

        priority_queue<pair<double, int> > wait;
        wait.push(make_pair(0, 0));
        vector<double> mincost(adj2.size(), INF);
        mincost[0] = 0;
        while(!wait.empty()){
            double cost = -wait.top().first;
            int pos = wait.top().second;
            wait.pop();
            if(cost > mincost[pos] +EPS) continue;
            if(pos == (int)adj2.size()-1) break;
            for(int i=0; i<(int)adj2[pos].size(); i++){
                int npos = adj2[pos][i].first;
                double ncost = cost +adj2[pos][i].second;
                if(ncost +EPS < mincost[npos]){
                    mincost[npos] = ncost;
                    wait.push(make_pair(-ncost, npos));
                }
            }
        }
        cout << fixed << setprecision(10);
        cout << mincost[adj2.size()-1] << endl;
    }    
    return 0;
}