#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
using namespace std;
double xs,ys,xt,yt,xa,ya,r,xb,yb,xc,yc,va,vb,vc;
double A,B,C;
void line(double m,double n,double p,double q){
A=n-q;B=-(m-p);C=q*m-p*n;//计算直线解析式
}
double dis(double m,double n,double p,double q){
double res=sqrt((m-p)*(m-p)+(n-q)*(n-q));//两点之间距离
return res;
}
int main(){
//freopen("Cola.txt","r",stdin);
freopen("five.in","r",stdin);freopen("five.out","w",stdout);
scanf("%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf",&xs,&ys,&xt,&yt,&xa,&ya,&r,&xb,&yb,&xc,&yc,&va,&vb,&vc);
if(xb>xc)swap(xb,xc),swap(yb,yc);
line(xb,yb,xc,yc);
if(va==vb&&va==0){
/*double d=fabs(A*xa+B*yb+C)/(sqrt(A*A+B*B));
if(d<=r){//直线与圆相交
double d1=dis(xa,ya,xb,yb);
double d2=dis(xa,ya,xc,yc);
double ans=min(d1,d2);
if(ans<=r){puts("0.000");return 0;}
ans-=r;printf("%.3lf",ans/vc);return 0;
}
double W=ya-(B*xa/A);
double footx=(-A*C-W*A*B)/(B*B+A*A);//垂足的坐标
double footy=(W*A*A-C*B)/(B*B+A*A);
if(footx>=xc){
double ans=dis(xa,ya,xc,yc);
ans-=r;
printf("%.3lf",ans/vc);return 0;
}
if(footx<=xb){
double ans=dis(xa,ya,xb,yb);
ans-=r;
printf("%.3lf",ans/vc);return 0;
}
if(footx<xc&&footx>xb){
double ans=d-r;
printf("%.3lf",ans/vc);return 0;
}*/
printf("%.3lf",dis(xs,ys,xt,yt)/vc);return 0;
}
if(r==0){
if(va==vb&&vb==vc){
double ans=dis(xs,ys,xt,yt)/va;
printf("%.3lf",ans);return 0;
}
double lx=xb,rx=xc,ly=yb,ry=yc;
double ans=1000000000;
for(int i=1;i<=40;i++){
double midx1=(2*lx+rx)/3.0,midy1=(2*ly+ry)/3.0;
double midx2=(2*rx+lx)/3.0,midy2=(2*ry+ly)/3.0;
double ans1=dis(xs,ys,midx1,midy1)/vc+dis(midx1,midy1,xt,yt)/vb;
double ans2=dis(xs,ys,midx2,midy2)/vc+dis(midx2,midy2,xt,yt)/vb;
if(ans1<ans2)ans=ans1,rx=midx2,ry=midy2;
else ans=ans2,lx=midx1,ly=midy1;
}
printf("%.3lf",ans);return 0;
}
printf("%.3lf",dis(xs,ys,xt,yt)/vc);
}