#include <stdio.h>
#include <string.h>
#include <queue>
#include <vector>
#include <utility>
#define INF 0x3FFFFFFF

using namespace std;

typedef pair<int,int> P;
typedef pair<pair<double,int>,P> PP;

int main(void){
	int n, m, s, g, x, y, l, c, i, j, dist[30][30], mspeed[30][30];
	double t[30/*city*/][31/*speed*/][30/*U-turn*/],ans;
	priority_queue<PP,vector<PP>,greater<PP> > que;
	while(1){
		scanf("%d%d",&n,&m);
		if(!n && !m) break;
		scanf("%d%d",&s,&g);
		s--,g--;
		memset(dist,-1,sizeof(dist));
		memset(mspeed,-1,sizeof(mspeed));
		for(i = 0;i < m;i++){
			scanf("%d%d%d%d",&x,&y,&l,&c);
			--x,--y;
			dist[x][y] = l, mspeed[x][y] = c;
			dist[y][x] = l, mspeed[y][x] = c;
		}
		for(i = 0;i < n;i++)
			for(j = 0;j <= 30;j++) for(l = 0;l < n;l++) t[i][j][l] = INF;
		t[s][0][s] = 0;
		que.push(PP(pair<double,int>(0,s),P(0,s)));
		while(que.size()){
			// city speed prev
			x = que.top().first.second,y = que.top().second.first,c = que.top().second.second;
			que.pop();
			for(i = 0;i < n;i++){
				for(j = -1;j <= 1;j++){ // 加減速
					if(dist[x][i] != -1 && mspeed[x][i] >= y + j && y + j > 0 && i != c && t[i][y + j][x] > t[x][y][c] + (double)dist[x][i] / (y + j)){
						t[i][y + j][x] = t[x][y][c] + (double)dist[x][i] / (y + j);
						que.push(PP(pair<double,int>(t[i][y + j][x],i),P(y + j,x)));
					}
				}
			}
		}
		ans = INF;
		for(i = 0;i < n;i++)
			ans>t[g][1][i]?ans=t[g][1][i]:0;
		if(ans != INF)
			printf("%f\n",ans);
		else
			printf("unreachable\n");
	}
	return 0;
}

		