#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int,P> P3;
typedef pair<double, P3> P4;
const ll MOD = ll(1e9+7);
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(3e5 + 5);
const double EPS = 1e-6;
const int di[] = {0, 1, 0, -1}, dj[] = {1, 0, -1, 0};
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define SORT(v) sort((v).begin(), (v).end())
#define ALL(v) (v).begin(), (v).end()

struct edge{
    int to, c;
    double d;
};

int n, m, s, g;
vector<vector<edge> > G;
double tmin[35][35][35];  // 頂点iに頂点jから速さkで到着するときの最短時間

void dijkstra(){
    REP(i,n)REP(j,n)fill(tmin[i][j],tmin[i][j]+35,double(IINF));
    priority_queue<P4, vector<P4>, greater<P4> > que;
    tmin[s][s][0] = 0.0;
    que.push({0.0,{s,{s,0}}});
    while(!que.empty()){
        P4 p = que.top();
        que.pop();
        int from = p.second.second.first, v = p.second.second.second, pre = p.second.first;
        if(p.first > tmin[from][pre][v] + EPS)continue;
        for(auto &e : G[from]){
            if(e.to == pre)continue;
            for(int dv=-1; dv<=1; dv++){
                int nv = v+dv;
                if(nv<=0 || nv>e.c)continue;
                if(tmin[e.to][from][nv] > tmin[from][pre][v] + e.d/double(nv) + EPS){
                    tmin[e.to][from][nv] = tmin[from][pre][v] + e.d/double(nv);
                    que.push(P4(tmin[e.to][from][nv],{from,{e.to,nv}}));
                }
            }
        }
    }
}


int main() {
    while(cin >> n >> m, n){
        cin >> s >> g;
        s--; g--;
        G.clear();
        G.resize(n);
        REP(i,m){
            int x, y, c;
            double d;
            cin >> x >> y >> d >> c;
            x--; y--;
            G[x].push_back({y,c,d});
            G[y].push_back({x,c,d});
        }
        dijkstra();
        double ans = double(IINF);
        REP(i,n) ans = min(ans, tmin[g][i][1]);
        if(ans<IINF/2){
            printf("%.8lf\n",ans);
        }
        else{
            cout << "unreachable" << endl;
        }
    }
    return 0;
}

