extern crate core;

use std::fmt;
use std::collections::BinaryHeap;
use std::cmp::Ordering;
macro_rules! read_line{
    () => {{
        let mut line = String::new();
        std::io::stdin().read_line(&mut line).ok();
        line
    }};
    (delimiter: ' ') => {
        read_line!().split_whitespace().map(|x|x.to_string()).collect::<Vec<_>>()
    };
    (delimiter: $p:expr) => {
        read_line!().split($p).map(|x|x.to_string()).collect::<Vec<_>>()
    };
    (' ') => {
        read_line!(delimiter: ' ')
    };
    ($delimiter:expr) => {
        read_line!(delimiter: $delimiter)
    };
    (' '; $ty:ty) => {
        read_line!().split_whitespace().map(|x|x.parse::<$ty>().ok().unwrap()).collect::<Vec<$ty>>()
    };
    ($delimiter:expr; $ty:ty) => {
        read_line!($delimiter).into_iter().map(|x|x.parse::<$ty>().ok().unwrap()).collect::<Vec<$ty>>()
    };
}
macro_rules! let_all {
    ($($n:ident:$t:ty),*) => {
        let line = read_line!(delimiter: ' ');
        let mut iter = line.iter();
        $(let $n:$t = iter.next().unwrap().parse().ok().unwrap();)*
    };
}
#[derive(Copy, Clone)]
struct Road{
    to: usize,
    distance: f64,
    limit: usize
}
#[derive(Copy, Clone)]
struct State {
    prev: usize,
    current: usize,
    time: f64,
    speed: usize,
}
impl Ord for State {
    fn cmp(&self, other: &Self) -> Ordering {
        ((other.time - self.time).signum() as i32).cmp(&0_i32)
    }
}
impl PartialOrd for State {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        Some(self.cmp(other))
    }
}
impl PartialEq for State {
    fn eq(&self, other: &Self) -> bool {
        self.current == other.current && self.time == other.time && self.speed == other.speed
    }
}
impl Eq for State {}
fn main() {
    loop {
        let_all!(n: usize, m: usize);
        if n == 0 && m == 0 {
            break
        }
        let_all!(s: usize, g: usize);
        let mut memo = vec![vec![vec![std::f64::MAX; 30]; n]; n];
        let mut queue = BinaryHeap::<State>::new();
        let mut roads = vec![Vec::<Road>::new(); n];
        for _ in 0..m {
            let_all!(x: usize, y: usize, d: f64, c: usize);
            roads[x - 1].push(Road { to: y - 1, distance: d, limit: c });
            roads[y - 1].push(Road { to: x - 1, distance: d, limit: c });
        }
        for &road in &roads[s - 1] {
            memo[s - 1][road.to][0] = road.distance;
            queue.push(State{prev: s - 1, current: road.to, time: road.distance, speed: 1});
        }
        let mut result = 0_f64;
        while let Some(State { prev, current, time, speed }) = queue.pop() {
            if current == g - 1 && speed == 1 {
                result = time;
                break
            }
            if memo[prev][current][speed - 1] == time {
                for &road in &roads[current] {
                    if road.to != prev {
                        for v in speed - 1..speed + 2 {
                            if v > 0 && v <= road.limit {
                                let new_time = time + road.distance / v as f64;
                                if memo[current][road.to][v - 1] > new_time {
                                    memo[current][road.to][v - 1] = new_time;
                                    queue.push(State { prev: current, current: road.to, time: new_time, speed: v });
                                }
                            }
                        }
                    }
                }
            }
        }

        if result == 0_f64 {
            println!("unreachable");
        } else {
            println!("{:.*}", 10, result);
        }
    }
}


Measured memory_bytes: 5092