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 <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
struct Point{
  double x, y;
  Point(){}
  Point(double x, double y) : x(x), y(y) {}
};
struct S{
  int line;
  int height;
  double cost;
  S(int l, int h, int c) :
    line(l), height(h), cost(c) {}
  bool operator < (const S& s) const {
    return cost > s.cost;
  }
};
int lb_index(vector<double>& v, int x){
  return lower_bound(v.begin(), v.end(), x) - v.begin();
}
bool valid_h(S& s, vector<Point>& ps, vector<double>& hs){
  return (s.height >= 0 && s.height < hs.size() && 
          min(ps[s.line].y, ps[s.line + 1].y) <= hs[s.height] &&
          max(ps[s.line].y, ps[s.line + 1].y) >= hs[s.height] );
}
void update(priority_queue<S>& que, double cost[1000][1000], S& next){
  if(cost[next.line][next.height] > next.cost){
    cost[next.line][next.height] = next.cost;
    que.push(next);
  }
}
void print(S& s, vector<double>& hs, vector<Point>& ps){
  printf("line %d: (%.0lf, %.0lf) -> (%.0lf, %.0lf) | height %d: y = %.0lf | cost %lf\n",
      s.line, ps[s.line].x, ps[s.line].y, ps[s.line + 1].x, ps[s.line + 1].y,
      s.height, hs[s.height], s.cost);
}
int main(){
  int N;
  double v_w, v_c;
  while(cin >> N >> v_w >> v_c && N){ 
    vector<Point> ps(N);
    REP(i, N) cin >> ps[i].x >> ps[i].y;
    vector<double> hs(N);
    REP(i, N) hs[i] = ps[i].y;
    sort(hs.begin(), hs.end());
    hs.erase(unique(hs.begin(), hs.end()), hs.end());
    int L = hs.size();
    vector< vector<int> > idxes(L); // y = hs[i]と交わる線分のインデックス
    REP(i, N - 1){
      REP(j, L){
        if(min(ps[i].y, ps[i + 1].y) <= hs[j] && hs[j] <= max(ps[i].y, ps[i + 1].y)){
          idxes[j].push_back(i);
        }
      }
    }
    /*
    REP(i, L){
      printf("idxes[%d]:", i);
      debug(idxes[i].begin(), idxes[i].end());
    }
    */
    priority_queue<S> que;
    double cost[1000][1000] = {};
    REP(i, N) REP(j, L) cost[i][j] = INF;
    cost[0][lb_index(hs, ps[0].y)] = 0;
    que.push(S(0, lb_index(hs, ps[0].y), 0));
    while(!que.empty()){
      S s = que.top(); que.pop();
      //print(s, hs, ps);
      if(cost[s.line][s.height] < s.cost) continue;
      if(s.line == N - 2 && hs[s.height] == ps[s.line + 1].y){
        if(ps[s.line].y == ps[s.line + 1].y) s.cost += (ps[s.line + 1].x - ps[s.line].x) / v_w;
        printf("%.16lf\n", s.cost);
        break;
      }
      if(hs[s.height] == ps[s.line].y){
        if(s.line > 0){
          S next = s;
          next.line --;
          if(ps[next.line].y == ps[next.line + 1].y) next.cost += (ps[next.line + 1].x - ps[next.line].x) / v_w;
          update(que, cost, next);
        }
      }
      if(hs[s.height] == ps[s.line + 1].y){
        if(s.line < N - 2){
          S next = s;
          next.line ++;
          if(ps[s.line].y == ps[s.line + 1].y) next.cost += (ps[s.line + 1].x - ps[s.line].x) / v_w;
          update(que, cost, next);
        }
      }
      for(int d = -1; d <= 1; d += 2){
        S next = s;
        next.height += d;
        if(valid_h(next, ps, hs)){
          assert(ps[s.line + 1].y != ps[s.line].y);
          double C = (ps[s.line + 1].x - ps[s.line].x) / (ps[s.line + 1].y - ps[s.line].y);
          double dy = (hs[s.height + d] - hs[s.height]);
          double dx = C * dy;
          //printf("dx = %lf dy = %lf\n", dx, dy);
          next.cost += sqrt(dx*dx + dy*dy) / v_w; // ??
          update(que, cost, next);
        }
      }
      if(idxes[s.height].back() != s.line && ps[s.line + 1].y != hs[s.height] && ps[s.line].y < ps[s.line + 1].y){
        S next = s;
        next.line = *upper_bound(idxes[s.height].begin(), idxes[s.height].end(), s.line);
        //printf("go tonnnel -> %d\n", next.line);
        double x1 = ps[s.line].x + (ps[s.line + 1].x - ps[s.line].x) * (hs[s.height] - ps[s.line].y) / (ps[s.line + 1].y - ps[s.line].y);
        double x2 = ps[next.line].x +
          ((ps[next.line + 1].y == ps[next.line].y) ? 0 : (ps[next.line + 1].x - ps[next.line].x) * (hs[next.height] - ps[next.line].y) / (ps[next.line + 1].y - ps[next.line].y));
        next.cost += (x2 - x1) / v_c; // ???
        update(que, cost, next);
      }
    }
  }
  return 0;
}