#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; ++i)
#define pii pair<int,int>

bool d[31][31][31];
pii edges[31][31];
int N;

class Node{
public:
    int n;
    int prev_n;
    double time;
    int v;

    Node(){}
    Node(int n,int prev_n,double time,int v): n(n), prev_n(prev_n), time(time), v(v){}

    bool operator> (const Node &n) const{
        return time>n.time;
    }

    void addtoq(priority_queue< Node, vector<Node>, greater<Node> > &q){
        //cout<<n<<" : "<<time<<endl;
        if(d[prev_n][n][v]) return;

        d[prev_n][n][v] = true;
        rep(i,N+1){
            if(i==prev_n) continue;
            if(!edges[n][i].first) continue;
            for(int j=-1;j<=1;j++){
                if(v+j>0 && v+j<=edges[n][i].second){
                    Node c=Node(i,n,time+((double)edges[n][i].first/(v+j)),v+j);
                    //cout<<i<<" "<<v+j<<"time"<<time+(double)edges[n][i].first/(v+j)<<endl;;
                    q.push(c);
                }
            }
        }
        //cout<<"!"<<endl;
    }
};

int main(){
    while(1){
        int M,S,G;
        cin>>N>>M>>S>>G;
        if(N==0) break;

        fill_n(*edges, 31*31, pii(0,0));
        rep(i,31)rep(j,31)rep(k,31)d[i][j][k]=false;

        rep(i,M){
            int x,y,d,c;
            cin>>x>>y>>d>>c;
            edges[x][y]=pii(d,c);
            edges[y][x]=pii(d,c);
        }

        priority_queue< Node, vector<Node>, greater<Node> > q;

        rep(i,N+1){
            if(!edges[S][i].first) continue;
            Node c=Node(i, S, edges[S][i].first, 1);
            q.push(c);
        }

        Node u;
        while(!q.empty()){
            u=q.top();q.pop();
            if(u.n==G && u.v==1) break;
            u.addtoq(q);
        }

        if(u.n==G && u.v==1){
            cout<<u.time<<endl;
        }
        else
        {
            cout<<"unreachable"<<endl;
        }
    }
    return 0;
}