#include <iostream>
#include <cmath>

int main() {
    int speed, turn_rate, start_x, start_y, end_x, end_y;
    std::cin >> speed >> turn_rate >> start_x >> start_y >> end_x >> end_y;

    if (start_y == end_y && start_x == end_x){
        std::cout << 0;
        return 0;
    }


    double length = std::sqrt((start_x-end_x)*(start_x-end_x) + (start_y-end_y)*(start_y-end_y));
    double degrees;
    if (start_y == end_y)
        degrees = 90;
    else if (start_x == end_x && end_y < start_y)
        degrees = 180;
    else
        degrees = std::atan(std::abs(start_x-end_x) / (double)(end_y - start_y)) / M_PI * 180;


    if (degrees < 0)
        degrees = 180 + degrees;

    double res = length / speed + degrees / turn_rate;

    std::cout << res;
    return 0;
}
