{$apptype console}

uses math;

const eps=1e-15;

var best,d,r,x1,y1,x2,y2,u,v,a1,a2:extended;

procedure norm(var x:extended);
begin
  if x < 0 then
    x:=x+2*pi;
  if x > 2*pi then
    x:=x-2*pi;
end;

function getabs(a,b:extended):extended;
begin
  norm(a);
  norm(b);
  if abs(a-b)>2*pi then
    runerror(200);
  result:=abs(a-b);
  if 2*pi-abs(a-b)<result then
    result:=2*pi-abs(a-b);
end;

function find(ang1,ang2:extended):extended;
var nx1,ny1,nx2,ny2:extended;
begin
  result:=r*(getabs(ang1,a1)+getabs(ang2,a2))/u;
  nx1:=cos(ang1)*r;
  ny1:=sin(ang1)*r;
  nx2:=cos(ang2)*r;
  ny2:=sin(ang2)*r+d;
  result:=result+sqrt(sqr(nx1-nx2)+sqr(ny1-ny2))/v;
end;

procedure run(mina1,maxa1,mina2,maxa2:extended);
var cur,ang1,ang2,len,diff:extended;
    found:boolean;
begin
  ang1:=(mina1+maxa1)/2;
  ang2:=(mina2+maxa2)/2;
  len:=1e100;
  diff:=1;
  while diff>eps do begin
    found:=false;

    len:=find(ang1,ang2);

    if (ang1>=mina1+diff) then begin
      cur:=find(ang1-diff,ang2);
      if cur<len then begin
        len:=cur;
        ang1:=ang1-diff;
        found:=true;
      end;
    end;

    if (ang2>=mina2+diff) then begin
      cur:=find(ang1,ang2-diff);
      if cur<len then begin
        len:=cur;
        ang2:=ang2-diff;
        found:=true;
      end;
    end;

    if (ang1<=maxa1-diff) then begin
      cur:=find(ang1+diff,ang2);
      if cur<len then begin
        len:=cur;
        ang1:=ang1+diff;
        found:=true;
      end;
    end;

    if (ang2<=maxa2-diff) then begin
      cur:=find(ang1,ang2+diff);
      if cur<len then begin
        len:=cur;
        ang2:=ang2+diff;
        found:=true;
      end;
    end;

    if not found then
      diff:=diff/2;
  end;
  if len<best then
    best:=len;
end;

begin
  reset(input, 'bike.in');
  rewrite(output, 'bike.out');

  randseed:=17;

  read(d,r,x1,y1,x2,y2,u,v);
  a1:=arctan2(y1,x1);
  a2:=arctan2(y2-d,x2);

  best:=1e100;

  run(0,pi,0,pi);
  run(0,pi,pi,2*pi);
  run(pi,2*pi,0,pi);
  run(pi,2*pi,pi,2*pi);

  writeln(best:0:10);
end.