/* ----- Header Files ----- */
// IO
#include <cstdio>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm
#include <algorithm>
#include <cmath>
#include <numeric>

// container
#include <vector>
#include <string>
#include <tuple>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>

// others
#include <random>
#include <limits>
#include <functional>
#include <ctime>
#include <cassert>
#include <cstdint>


/* ----- Type Alias ----- */
using Bool = bool;
using Int = long long int;
using Real = long double;
using Char = char;
using String = std::string;
template <class... Ts>
using Tuple = std::tuple<Ts...>;

template <class T>
using Vector = std::vector<T>;
template <class T>
using Matrix = Vector<Vector<T>>;
template <class T>
using Queue = std::queue<T>;
template <class T>
using Stack = std::stack<T>;
template <class T>
using Deque = std::deque<T>;

template <class T>
using MaxHeap = std::priority_queue<T>;
template <class T>
using MinHeap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T>
using Set = std::set<T>;
template <class T, class U>
using Map = std::map<T, U>;

template <class T, class... Us>
using Func = std::function<T(Us...)>;

template <class T>
T genv(T v) { return v; }

template <class T, class... Ts>
auto genv(size_t l, Ts... ts) {
    return Vector<decltype(genv<T>(ts...))>(l, genv<T>(ts...));
}

struct Edge {
    Int src, dst;
    Real len;
    Int cap;
    Edge(Int src = -1, Int dst = -1, Real len = -1, Int cap = -1)
        : src(src), dst(dst), len(len), cap(cap){};
};

using Graph = Vector<Vector<Edge>>;

/* ----- Misc ----- */
void fastio() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
}

struct Fout {
    Int precision;
    Fout(Int precision) : precision(precision) {}
};
std::ostream& operator<<(std::ostream& os, const Fout& fio) {
    os << std::fixed << std::setprecision(fio.precision);
    return os;
}


/* ----- Constants ----- */
// constexpr Int INF = std::numeric_limits<Int>::max() / 3;
// constexpr Int MOD = 1000000007;
// constexpr Real PI = acos(-1);
// constexpr Real EPS = 1e-10;
// std::mt19937 mt(int(std::time(nullptr)));

constexpr Real INF = std::numeric_limits<Real>::max() / 10;
constexpr Int C = 30;

Bool solve() {
    Int n, m;
    std::cin >> n >> m;
    if (n == 0) return false;

    Int s, g;
    std::cin >> s >> g;
    --s, --g;

    Graph graph(n);
    for (Int i = 0; i < m; ++i) {
        Int u, v, l, c;
        std::cin >> u >> v >> l >> c;
        --u, --v;
        graph[u].emplace_back(u, v, l, c);
        graph[v].emplace_back(v, u, l, c);
    }

    auto dp = genv<Real>(n, n, C + 1, INF);
    dp[s][s][0] = 0;
    MinHeap<Tuple<Real, Int, Int, Int>> heap;
    heap.emplace(0, s, s, 0);

    while (!heap.empty()) {
        Real d;
        Int v, p, s;
        std::tie(d, v, p, s) = heap.top();
        heap.pop();
        if (d > dp[v][p][s]) continue;

        for (Int ss = s - 1; ss <= s + 1; ++ss) {
            if (ss <= 0) continue;

            for (auto e : graph[v]) {
                if (e.dst == p || e.cap < ss) continue;

                Real dt = e.len / ss;
                if (dp[e.dst][e.src][ss] > d + dt) {
                    dp[e.dst][e.src][ss] = d + dt;
                    heap.emplace(dp[e.dst][e.src][ss], e.dst, e.src, ss);
                }
            }
        }
    }

    Real ans = INF;
    for (Int v = 0; v < n; ++v) {
        ans = std::min(ans, dp[g][v][1]);
    }

    if (ans == INF) {
        std::cout << "unreachable" << std::endl;
    } else {
        std::cout << Fout(12) << ans << std::endl;
    }
    return true;
}

int main() {
    while (solve()) {}
    return 0;
}



Measured memory_bytes: 4860