#define LOCAL
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rrep(i, n) for(int i=(n-1); i>=0; --i)
#define rep2(i, s, n) for(int i=s; i<(n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define memr(dp, val) memset(dp, val, sizeof(dp))
using namespace std;
typedef long long ll;
static const int INTINF = (INT_MAX >> 1); // 10^9 + 10^7
static const ll LLINF = (LLONG_MAX >> 1);
static const int MAX = 1e5+1;
static const ll MOD = 1e9+7;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T> >;
string to_string(string s) { return '"' + s + '"'; }
string to_string(bool b) { return b ? "true" : "false"; }
template <size_t N> string to_string(bitset<N> bs) {
  string res;
  for (size_t i = 0; i < N; ++i) res += '0' + bs[i];
  return res;
}
string to_string(vector<bool> v) {
  string res = "{";
  for (bool e : v) res += to_string(e) + ", ";
  return res += "}";
}
template <class T, class U> string to_string(pair<T, U> p);
template <class C> string to_string(C c) {
  string res = "{";
  for (auto e : c) res += to_string(e) + ", ";
  return res += "}";
}
template <class T, class U> string to_string(pair<T, U> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
void debug() { cerr << '\n'; }
template <class Head, class... Tail> void debug(Head head, Tail... tail) {
  cerr << '\t' << to_string(head), debug(tail...);
}
#ifdef LOCAL
#define print(...) cerr << "[" << #__VA_ARGS__ << "]:", debug(__VA_ARGS__)
#else
#define print(...)
#endif

struct edge{
	int to, cost, lim;
};

struct pack{
	double a;
	int b, c, d;
	bool operator>(const pack& pa) const{
		return pa.a < a;
	}
};

vector<edge> glp[100];
double dp[50][50][50];

int main(int argc, const char * argv[]) {
	std::cout << std::fixed << std::setprecision(15);

	while(1){
		int n, m;
		cin >> n >> m;
		if(!n && !m) break;
		rep(i, 100) glp[i].clear();
		int s, g;
		cin >> s >> g;
		s--; g--;
		rep(i, m){
			int x, y, d, c;
			cin >> x >> y >> d >> c;
			x--; y--;
			glp[x].push_back({y, d, c});
			glp[y].push_back({x, d, c});
		}

		rep(i, 50) rep(j, 50) rep(k, 50) dp[i][j][k] = INTINF;
		bool vis[50][50][50];
		memr(vis, 0);
		dp[s][0][s] = 0;
		vis[s][0][s] = true;
		// 距離, 遷移先, 現在の速度, befV
		min_priority_queue<pack> que;
		que.push({0, s, 0, s});
		while(!que.empty()){
			auto f = que.top(); que.pop();

			double dist = f.a;
			int v = f.b;
			int ovec = f.c;
			int bef = f.d;

			// print(v);
			rep(i, 3){
				int vec = ovec - 1 + i;
				// if(v == s && ovec == 1) vec = 1;
				if(vec <= 0) continue;
				// print(vec);
				for(edge u : glp[v]){
					if(vis[u.to][vec][v]) continue;
					if(u.lim < vec) continue;
					if(u.to == bef) continue;
					// print(u.to);
					if(chmin(dp[u.to][vec][v], dp[v][ovec][bef] + (double)u.cost / (double)vec)){
						vis[u.to][vec][v] = true;
						que.push({dp[v][ovec][bef] + (double)u.cost / (double)vec, u.to, vec, v});
					}
				}
			}
		}

		double ans = INTINF;
		rep(j, 50) chmin(ans, dp[g][1][j]);

		if(ans == INTINF){
			cout << "unreachable" << endl;
		}
		else{
			cout << ans << endl;
		}
		// break;
	}




	return 0;
}



Measured memory_bytes: 4712