#include<bits/stdc++.h>
using namespace std;

typedef long double ldouble;

const ldouble eps = 0.000000001;

bool eq(ldouble a,ldouble b){
  return (-eps<a-b && a-b<eps);
}


struct Point{
  ldouble x,y;
  Point operator + (const Point p)const{
    return (Point){x+p.x,y+p.y};
  }
  Point operator - (const Point p)const{
    return (Point){x-p.x,y-p.y};
  }
  Point operator * (const ldouble r)const{
    return (Point){x*r,y*r};
  }
};
bool eq(Point a,Point b){
  return ( eq(a.x,b.x) && eq(a.y,b.y) );
}

typedef Point Vector;

ldouble dot(Vector a,Vector b){
  return a.x*b.x+a.y*b.y;
}

ldouble cross(Vector a,Vector b){
  return a.x*b.y-b.x*a.y;
}
ldouble norm(Vector v){
  return dot(v,v);
}

ldouble abs(Vector v){
  return sqrt(norm(v));
}


Point project(Point a,Point b,Point p){
  Point base=b-a;
  ldouble r=dot(p-a,base)/norm(base);
  return a+base*r;
}

ldouble calc(ldouble a,ldouble b,ldouble c){
  return (-b + sqrt(b*b-4.0*a*c))/ (2.0*a);
}



int n;
ldouble A,B;
vector<Point> t;
Point s,g;
ldouble ans;

ldouble func0(double H,double W){
  ldouble a=1.0;
  ldouble b=-2.0*W;
  ldouble c=W*W-(A*A*H*H)/(B*B-A*A);
  if(b*b-4.0*a*c<0)return min(H*B+W*A, sqrt(H*H+W*W)*B);
  ldouble t = (-b+sqrt(b*b-4.0*a*c))/(2.0*a);
  if(t>W){
    t=(-b-sqrt(b*b-4.0*a*c))/(2.0*a);
    if(t<0)return min(H*B+W*A, sqrt(H*H+W*W)*B);
  }
  return t;
}
ldouble func02(Point a,Point b,Point g){
  Point D=project(a,b,g);
  return func0( abs(g-D) , abs(a-D) );
}

ldouble func(ldouble H,ldouble W){
  ldouble a=1.0;
  ldouble b=-2.0*W;
  ldouble c=W*W-(A*A*H*H)/(B*B-A*A);
  if(b*b-4.0*a*c<0)return min(H*B+W*A, sqrt(H*H+W*W)*B);
  ldouble t = (-b+sqrt(b*b-4.0*a*c))/(2.0*a);
  if(t>W){
    t=(-b-sqrt(b*b-4.0*a*c))/(2.0*a);
    if(t<0)return min(H*B+W*A, sqrt(H*H+W*W)*B);
  }
  ldouble ff = t*A+B*sqrt((W-t)*(W-t)+H*H );
  return ff;
}

ldouble func2(Point a,Point b,Point g){
  Point D=project(a,b,g);
  return func( abs(g-D) , abs(a-D) );
}

void solve(){


  vector<Point> T;

  for(int i=0;i<n;i++){
    T.push_back(t[i]);
    if(i+1<n){
      ldouble tt = func02(t[i],t[i+1],g);
      Vector base=t[i+1]-t[i];      
      Point next =  t[i]+ base*( tt /abs(base) );
      if(!eq(next,t[i])&&!eq(next,t[i+1])
         && eq(abs(t[i]-next)+abs(t[i+1]-next),abs(t[i]-t[i+1]))
         )T.push_back(next);
    }
  }
  
  t=T;
  n=t.size();
  vector<ldouble> u(n);  
  u[0]=0;
  u[1]=abs(t[0]-t[1])*A;

  for(int i=2;i<n;i++){
    u[i]=u[i-1]+abs(t[i]-t[i-1])*A;
    for(int j=1;j<i;j++){
      u[i]=min(u[i],u[j-1]+func2(t[j-1],t[j],t[i]));
      u[i]=min(u[i],u[j-1]+func2(t[i],t[i-1],t[j-1]));
    }
  }
  for(int i=0;i+1<n;i++){
    /*
    cout<<i<<endl;
    cout<<(int)t[i].x<<' '<<(int)t[i].y<<endl;
    cout<<(int)t[i+1].x<<' '<<(int)t[i+1].y<<endl;
    cout<<(double)u[i]<<' '<<(double)u[i+1]<<endl;    
    cout<<(double)abs(t[i+1]-t[i])*(double)A<<endl;
    cout<<endl;
    */
    ldouble na = u[i]+func2(t[i],t[i+1],g);
    ans=min(ans,na);
  }

}

int main(){  
  while(1){
    vector<Point> nt;
    cin>>n;
    if(n==0)break;
    t.clear();t.resize(n);
    for(int i=0;i<n;i++)cin>>t[i].x>>t[i].y;
    cin>>A>>B>>s.x>>s.y>>g.x>>g.y;

    int flg=0,f=-1;
    for(int i=0;i<n;i++){
      int j=(i+1)%n;      
      if(eq(s,t[i]))flg=1;
      if(eq( abs(s-t[i])+abs(s-t[j]) , abs(t[i]-t[j]) )){
        f=j;
        break;
      }
    }
    
    if(flg==0)nt.push_back(s);
    else f=(f+n-1)%n;
    for(int j=0;j<n;j++)nt.push_back(t[(f+j)%n]);
    n=nt.size();
    t=nt;
    ans=abs(s-g)*B;
    solve();
    reverse(t.begin()+1,t.end());
    solve();
    double ans2=ans;
    printf("%.14f\n",ans2);
  }
  return 0;
}

Measured memory_bytes: 1288