#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<vector>
#include<queue>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e+10;
const double PI = acos(-1);
int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline double ABS(double a){return max(a,-a);}
struct Pt {
	double x, y;
	Pt() {}
	Pt(double x, double y) : x(x), y(y) {}
	Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
	Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
	Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
	Pt operator-() const { return Pt(-x, -y); }
	Pt operator*(const double &k) const { return Pt(x * k, y * k); }
	Pt operator/(const double &k) const { return Pt(x / k, y / k); }
	double ABS() const { return sqrt(x * x + y * y); }
	double abs2() const { return x * x + y * y; }
	double arg() const { return atan2(y, x); }
	double dot(const Pt &a) const { return x * a.x + y * a.y; }
	double det(const Pt &a) const { return x * a.y - y * a.x; }
};
double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(Pt a, Pt b, Pt c) {
	int s = sig((b - a).det(c - a));
	if (s) return s;
	if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
	if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
	return 0;
}
Pt pLL(Pt a, Pt b, Pt c, Pt d) {
	b = b - a; d = d - c; return a + b * (c - a).det(d) / b.det(d);
}
Pt hLP(Pt a,Pt b,Pt c){
	return pLL(a,b,c,c+(b-a)*Pt(0,1));
}
//inside: +1 on: 0 outside: -1
int sGP(int n, Pt p[], Pt a) {
	int side = -1, i;
	p[n] = p[0];
	for (i = 0; i < n; ++i) {
		Pt p0 = p[i] - a, p1 = p[i + 1] - a;
		if (sig(p0.det(p1)) == 0 && sig(p0.dot(p1)) <= 0) return 0;
		if (p0.y > p1.y) swap(p0, p1);
		if (sig(p0.y) <= 0 && 0 < sig(p1.y) && sig(p0.det(p1)) > 0) side = -side;
	}
	return side;
}

Pt p[20];
Pt h[20];
double ijk[1100];
int v[1100];
int main(){
	int a;
	while(scanf("%d",&a),a){
		double tg,tw;
		for(int i=0;i<a;i++){
			double X,Y;
			scanf("%lf%lf",&X,&Y);
			p[i]=Pt(X,Y);
		}
		p[a]=p[0];
		scanf("%lf%lf",&tg,&tw);
		Pt s,t;
		double X,Y;
		scanf("%lf%lf",&X,&Y);
		s=Pt(X,Y);
		scanf("%lf%lf",&X,&Y);
		t=Pt(X,Y);
		double th=asin(tg/tw);
		for(int i=0;i<a;i++){
			h[i]=hLP(p[i],p[i+1],t);
		}
		vector<Pt> hb;
		hb.push_back(s);
		hb.push_back(t);
		for(int i=0;i<a;i++){
			hb.push_back(p[i]);
		}
		for(int i=0;i<a;i++){
			for(int j=0;j<a;j++){
				if(i==j||i==j+1)continue;
				Pt tmp=hLP(p[j],p[j+1],p[i]);
				double dist=(tmp-p[i]).ABS();
				double len=dist*tan(th);
				Pt vec=p[j+1]-p[j];
				vec=vec/(vec.ABS())*len;
				Pt t1=tmp+vec;
				Pt t2=tmp-vec;
				if(iSP(p[j],t1,p[j+1])==2)hb.push_back(t1);
				if(iSP(p[j],t2,p[j+1])==2)hb.push_back(t2);
			}
		}
		for(int j=0;j<a;j++){
			Pt tmp=hLP(p[j],p[j+1],t);
			double dist=(tmp-t).ABS();
			double len=dist*tan(th);
			Pt vec=p[j+1]-p[j];
			vec=vec/(vec.ABS())*len;
			Pt t1=tmp+vec;
			Pt t2=tmp-vec;
			if(iSP(p[j],t1,p[j+1])==2)hb.push_back(t1);
			if(iSP(p[j],t2,p[j+1])==2)hb.push_back(t2);
		}
		for(int j=0;j<a;j++){
			Pt tmp=hLP(p[j],p[j+1],s);
			double dist=(tmp-s).ABS();
			double len=dist*tan(th);
			Pt vec=p[j+1]-p[j];
			vec=vec/(vec.ABS())*len;
			Pt t1=tmp+vec;
			Pt t2=tmp-vec;
			if(iSP(p[j],t1,p[j+1])==2)hb.push_back(t1);
			if(iSP(p[j],t2,p[j+1])==2)hb.push_back(t2);
		}
		int sz=hb.size();
		for(int i=0;i<sz;i++){
			v[i]=0;
			ijk[i]=999999999;
		}
		ijk[0]=0;
		for(int i=0;i<sz;i++){
			int at=0;
			double tmp=999999999;
			for(int j=0;j<sz;j++){
				if(!v[j]&&tmp>ijk[j]){
					at=j;tmp=ijk[j];
				}
			}
			v[at]=1;
			for(int j=0;j<sz;j++){
				if(v[j])continue;
				Pt M=(hb[at]+hb[j])/2;
				double toc=ijk[at];
				if(sGP(a,p,M)==0)toc+=(hb[at]-hb[j]).ABS()*tg;
				else toc+=(hb[at]-hb[j]).ABS()*tw;
				ijk[j]=min(ijk[j],toc);
			}
		}
		//for(int i=0;i<sz;i++)printf("(%f %f): %f\n",hb[i].x,hb[i].y,ijk[i]);
		printf("%.12f\n",ijk[1]);
	}
}

Measured memory_bytes: 1192