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 <complex>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;

typedef complex<double> P;
#define EPS 1e-5
#define INF 1e7

typedef pair<int, double> Node;

class State
{
public:
	int n;
	double c;
	State(int n, double c)
		:n(n),c(c)
	{}

	bool operator<(const State& s) const
	{
		return c>s.c;
	}
};

//üª
struct L : public vector<P> {
  L(const P &a, const P &b) {
    push_back(a); push_back(b);
  }
};


//OÏ
double cross(const P& a, const P& b) {
  return imag(conj(a)*b);
}

double dist(const P& a, const P& b)
{
	return abs(a-b);
}

bool intersect(L& a, L& b)
{
	double t=max(a[0].imag(), a[1].imag());
	double l=min(a[0].imag(), a[1].imag());

	return (t+EPS>b[0].imag()&&b[0].imag()>l-EPS);
}

P crosspoint(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]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0]; // same line
  return m[0] + B / A * (m[1] - m[0]);
}

int main()
{
	cout << setprecision(10) << setiosflags(ios::fixed);
	double vw,vc;
	int N;
	
	while(cin >> N, N)
	{
		vector<P> in;

		cin >> vw >> vc;
		for(int i=0; i<N; i++)
		{
			double x,y;
			cin >> x >> y;
			in.push_back(P(x,y));
		}

		vector<Node> node[4000];
		for(int i=0; i<N-1; i++)
		{
			node[i].push_back(make_pair(i+1, dist(in[i], in[i+1])/vw));
		}

		for(int i=0; i<N; i++)
		{
			L hz(P(-INF,in[i].imag()),P(INF,in[i].imag()));
			for(int j=i-2; j>=0; j--)
			{
				if(in[i].imag()+EPS > in[j+1].imag()) break;
				L tmp(in[j], in[j+1]);
				if(intersect(tmp,hz))
				{
					P xp=crosspoint(hz,tmp);
					in.push_back(xp);
					int p=in.size();
					node[j].push_back(make_pair(p, dist(in[j], xp)/vw));
					node[p].push_back(make_pair(j+1, dist(in[j+1], xp)/vw));
					node[p].push_back(make_pair(i, dist(in[i], xp)/vc));
					
					break;
				}
			}
			for(int j=i+1; j<N-1; j++)
			{
				if(in[i].imag()+EPS > in[j].imag()) break;

				L tmp(in[j], in[j+1]);
				if(intersect(tmp,hz))
				{
					P xp=crosspoint(hz,tmp);
					in.push_back(xp);
					int p=in.size();
					node[j].push_back(make_pair(p, dist(in[j], xp)/vw));
					node[p].push_back(make_pair(j+1, dist(in[j+1], xp)/vw));
					node[i].push_back(make_pair(p, dist(in[i], xp)/vc));
					
					break;
				}
			}
		}

		priority_queue<State> q;
		q.push(State(0,0));
		bool v[4000]={0};

		while(!q.empty())
		{
			State s=q.top(); q.pop();
			if(v[s.n]) continue;
			v[s.n]=1;

			if(s.n==N-1)
			{
				cout << s.c << endl;
				break;
			}

			for(int i=0; i<node[s.n].size(); i++)
			{
				Node next=node[s.n][i];
				if(v[next.first]) continue;

				q.push(State(next.first, s.c+next.second));
			}

		}


	}
}