#include <stdio.h>
#include <math.h>
#include <stdlib.h>

#define PI 3.14159265358979311600

int main() {
    int s, t, xf,yf,xt,yt;

    scanf("%d %d", &s, &t);
    scanf("%d %d %d %d", &xf, &yf, &xt, &yt);

    int xd = abs(xf-xt);
    int yd = abs(yf-yt);

    // int l = sqrt(abs(xf*xf - xt*xt)+ abs(yf*yf - yt*yt));
    double l = sqrt(xd*xd + yd*yd);

    //printf("l = %lf, %d, %d \n", l, xd, yd);

    double d = acos(xd/l);
   
    d = (d*180)/PI;
    d = fabs(d - 90);
    if (yf > yt){
        d = 180 - d;
    }
    //printf("d = %.20lf\n", d);
    double r = (l/s)+(d/t);
    
    
    printf("%lf\n", r);

    return 0;
}