#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <assert.h>
#include <queue>
#include <functional>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define fi first
#define sc second
#define mp make_pair
typedef pair<int,int> P;
typedef pair<int,P> Q;
typedef pair<double,Q> R;

double dist[32][32][32];
int n,m;
int s,g;
int x[1095],y[1095],d[1095],c[1095];
vector<Q>vec[32];

int main(){
	while(1){
		cin>>n>>m;if(n==0) return 0;
		cin>>s>>g;
		for(int i=1;i<=n;i++) vec[i].clear();
		rep(i,m){
			cin>>x[i]>>y[i]>>d[i]>>c[i];
			vec[x[i]].push_back(mp(y[i],mp(d[i],c[i])));
			vec[y[i]].push_back(mp(x[i],mp(d[i],c[i])));
		}
		rep(i,32)rep(j,32)rep(k,32) dist[i][j][k] = 1e9;
		
		priority_queue<R,vector<R>,greater<R> >que;
		for(int i=0;i<vec[s].size();i++){
			double D = (double)(vec[s][i].sc.fi);
			dist[s][vec[s][i].fi][1] = D;
			que.push(mp(D,mp(s,mp(vec[s][i].fi,1))));
		}
		while(!que.empty()){
			R r = que.top(); que.pop();
			int pre = r.sc.fi;
			int cur = r.sc.sc.fi;
			int v = r.sc.sc.sc;
			if(r.fi > dist[pre][cur][v]+1e-12) continue;
			for(int x=max(1,v-1);x<=v+1;x++){
				for(int i=0;i<vec[cur].size();i++){
					if(vec[cur][i].fi == pre) continue;
					if(vec[cur][i].sc.sc < x) continue;
					double need = (double)(vec[cur][i].sc.fi)/(double)(x);
					if(dist[cur][vec[cur][i].fi][x] > dist[pre][cur][v]+need+1e-12){
						dist[cur][vec[cur][i].fi][x] = dist[pre][cur][v]+need;
						que.push(mp(dist[cur][vec[cur][i].fi][x],mp(cur,mp(vec[cur][i].fi,x))));
						
						
					}
				}
			}
		}
		double ans = 1e9;
		for(int i=1;i<=n;i++) for(int j=0;j<32;j++) ans = min(ans,dist[i][g][1]);
		if(ans > 5e8) puts("unreachable");
		else {printf("%.12f",ans);puts("");}


	}
}

