#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
#include<cmath>
#include<complex>

using namespace std;

int xi,yi,vi;
int xp,yp,vp;

double check(vector<pair<int,int> > v,double &cx,double &cy,double t){
  double l=t,h=1e9;
  double lx,ly;
  for(int i=0;i<1000;i++){
    double m=(l+h)/2;
    double r=m;
    int idx;
    for(idx=0;idx<v.size()-1;idx++){
      double ct=hypot(v[idx+1].first-v[idx].first,v[idx+1].second-v[idx].second)/vi;
      if(r<ct)break;
      r-=ct;
    }
    if(idx==v.size()-1){
      lx=v.back().first;
      ly=v.back().second;
    }else{
      complex<double> d=complex<double>(v[idx+1].first-v[idx].first,v[idx+1].second-v[idx].second);
      auto p=d/abs(d)*r*double(vi);
      lx=v[idx].first+p.real();
      ly=v[idx].second+p.imag();
    }
    if(hypot(cx-lx,cy-ly)<=vp*(m-t)){
      h=m;
    }else{
      l=m;
    }
  }
  cy=ly;
  cx=lx;
  return h;
}

int main(){
  int N;
  cin>>N;
  int x[1234],y[1234];
  for(int i=0;i<N;i++){
    cin>>x[i]>>y[i];
  }
  cin>>xi>>yi>>vi;
  cin>>xp>>yp>>vp;
  vector<pair<int,int> > v[2];
  for(int i=0;i<N;i++){
    if(x[i]==xi&&y[i]==yi){
      for(int j=i;j<N;j++){
	v[0].emplace_back(x[j],y[j]);
      }
      for(int j=i;j>=0;j--){
	v[1].emplace_back(x[j],y[j]);
      }
      goto endinit;
    }
  }
  for(int i=0;i<N-1;i++){
    if(min(x[i],x[i+1])<=xi&&xi<=max(x[i],x[i+1])&&min(y[i],y[i+1])<=yi&&yi<=max(y[i],y[i+1])
       &&(y[i+1]-y[i])*(xi-x[i])==(yi-y[i])*(x[i+1]-x[i])){
      v[0].emplace_back(xi,yi);
      for(int j=i;j>=0;j--){
	v[0].emplace_back(x[j],y[j]);
      }
      v[1].emplace_back(xi,yi);
      for(int j=i+1;j<N;j++){
	v[1].emplace_back(x[j],y[j]);
      }
      goto endinit;
    }
  }
 endinit:
  double t[2][2];
  for(int i=0;i<2;i++){
    double cx=xp,cy=yp;
    double ct=0;
    for(int j=0;j<2;j++){
      t[i][j]=check(v[i^j],cx,cy,ct);
      ct=t[i][j];
    }
  }
  double leave[2]={};
  for(int i=0;i<2;i++){
    for(int j=0;j<v[i].size()-1;j++){
      leave[i]+=hypot(v[i][j+1].first-v[i][j].first,v[i][j+1].second-v[i][j].second)/vi;
    }
  }
  cout<<fixed<<min({max(leave[0],leave[1]),t[0][1],t[1][1],max(t[0][0],leave[1]),max(t[1][0],leave[0])});
}