#include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
const double EPS = 1e-7;
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); }
    bool operator==(const Pt &a)const{ return !sig(x-a.x)&&!sig(y-a.y);}
    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;
}
double x[1100];
double y[1100];
Pt p[1100];
int main(){
	int a;scanf("%d",&a);
	for(int i=0;i<a;i++)scanf("%lf%lf",x+i,y+i);
	for(int i=0;i<a;i++)p[i]=Pt(x[i],y[i]);
	double tx,ty,tv;
	double px,py,pv;
	scanf("%lf%lf%lf%lf%lf%lf",&tx,&ty,&tv,&px,&py,&pv);
	Pt st=Pt(tx,ty);
	Pt sp=Pt(px,py);
	int at=0;
	double ret=0;
	for(int i=0;i<a-1;i++){
		if((iSP(p[i],p[i+1],st)+2)%2==0){
			at=i;break;
		}
	}
	double left=0;
	double right=0;
	for(int i=0;i<=at;i++){
		if(i==at)right+=(st-p[i]).ABS();
		else right+=(p[i+1]-p[i]).ABS();
	}
	right/=tv;
	ret=max(ret,right);
	Pt f;
	double ft;
	bool fcan=false;
	bool gcan=false;
	for(int i=0;i<50;i++){
		double M=(left+right)/2;
		double m=M*tv;
		f=p[0];
		for(int j=at;j>=0;j--){
			double d=0;
			Pt start=p[j+1];
			if(j==at){
				if((st-p[j]).ABS()<EPS)continue;
				d=(st-p[j]).ABS();
				start=st;
			}else d=(p[j+1]-p[j]).ABS();
			if(m<d){
				f=start+(p[j]-start)*(m/d);
				break;
			}else m-=d;
		}
		double d2=(sp-f).ABS()/pv;
		if(d2>M){
			left=M;
		}else{
			right=M;
			fcan=true;
		}
	}
	ft=right;
	
	left=right=0;
	for(int i=at;i<a-1;i++){
		if(i==at)right+=(st-p[i+1]).ABS();
		else right+=(p[i+1]-p[i]).ABS();
	}
	right/=tv;
	ret=max(ret,right);
	Pt g;
	double gt;
	for(int i=0;i<50;i++){
		double M=(left+right)/2;
		double m=M*tv;
		g=p[a-1];
		for(int j=at;j<a-1;j++){
			double d=0;
			Pt start=p[j];
			if(j==at){
				if((st-p[j+1]).ABS()<EPS)continue;
				d=(st-p[j+1]).ABS();
				start=st;
			}else d=(p[j+1]-p[j]).ABS();
			if(m<d){
				g=start+(p[j+1]-start)*(m/d);
				break;
			}else m-=d;
		}
		double d2=(sp-g).ABS()/pv;
		if(d2>M){
			left=M;
		}else{
			right=M;
			gcan=true;
		}
	}
	gt=right;
	left=0;
	right=0;
	sp=f;
	for(int i=at;i<a-1;i++){
		if(i==at)right+=(st-p[i+1]).ABS();
		else right+=(p[i+1]-p[i]).ABS();
	}
	bool hcan=false;
	right/=tv;
	//right=ret;
	right=max(right,ft);
	Pt tmp;
	for(int i=0;i<50;i++){
		double M=(left+right)/2;
		double m=M*tv;
		tmp=p[a-1];
		for(int j=at;j<a-1;j++){
			double d=0;
			Pt start=p[j];
			if(j==at){
				if((st-p[j+1]).ABS()<EPS)continue;
				d=(st-p[j+1]).ABS();
				start=st;
			}else d=(p[j+1]-p[j]).ABS();
			if(m<d){
				tmp=start+(p[j+1]-start)*(m/d);
				break;
			}else m-=d;
		}
		double d2=(sp-tmp).ABS()/pv;
		if(d2+ft>M)left=M;
		else {right=M;hcan=true;}
	}
	if(fcan)ret=min(ret,right);
	
	left=0;
	right=0;
	sp=g;
	for(int i=0;i<=at;i++){
		if(i==at)right+=(st-p[i]).ABS();
		else right+=(p[i+1]-p[i]).ABS();
	}
	hcan=false;
	right/=tv;
	right=max(right,gt);
	//right=ret;
	for(int i=0;i<50;i++){
		double M=(left+right)/2;
		double m=M*tv;
		tmp=p[0];
		for(int j=at;j>=0;j--){
			double d=0;
			Pt start=p[j+1];
			if(j==at){
				if((st-p[j]).ABS()<EPS)continue;
				d=(st-p[j]).ABS();
				start=st;
			}else d=(p[j+1]-p[j]).ABS();
			if(m<d){
				tmp=start+(p[j]-start)*(m/d);
				break;
			}else m-=d;
		}
		double d2=(sp-tmp).ABS()/pv;
		if(d2+gt>M)left=M;
		else {right=M;hcan=true;}
	}
	if(gcan)ret=min(ret,right);
//	printf("%f %f %f\n",f.x,f.y,ft);
//	printf("%f %f %f\n",g.x,g.y,gt);
	
	printf("%.9f\n",ret);
}

Measured memory_bytes: 1132