// Aizu 1162: Discrete Speed
// 2017.9.18 bal4u@uu

#include <stdio.h>
#include <string.h>

#define MAX 30000
typedef struct { double t; int k, c, p; } QUE;
QUE que[MAX]; int qsize;

#define PARENT(i) ((i)>>1)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

void min_heapify(int i)
{
  int l, r;
  int smallest;

  l = LEFT(i), r = RIGHT(i);
  if (l < qsize && que[l].t < que[i].t) smallest = l; else smallest = i;
  if (r < qsize && que[r].t < que[smallest].t) smallest = r;
  if (smallest != i) {
    QUE t = que[i]; que[i] = que[smallest]; que[smallest] = t;
    min_heapify(smallest);
  }
}

int deq(int *k, int *c, int *p)
{
  if (qsize == 0) return 0;
  *k = que[0].k, *c = que[0].c, *p = que[0].p;
  que[0] = que[--qsize];
  min_heapify(0);
  return 1;
}

void enq(double t, int k, int c, int p)
{
  int i, ii;

  i = qsize++;
  que[i].t = t, que[i].k = k, que[i].c = c, que[i].p = p;
  while (i > 0 && que[ii = PARENT(i)].t > que[i].t) {
    QUE tt = que[i]; que[i] = que[ii]; que[ii] = tt;
    i = ii;
  }
}

typedef struct { int len, to[32], d[32], c[32]; } TBL;
TBL tbl[32];
double node[32][32][32]; int size;
int start, goal;

double search()
{
	int i, j, a, b, v, pre, v2;
	double t;
	TBL *p;

	qsize = 0;
	memset(node, 0, sizeof(node));
	node[start][0][0] = 0;
	enq(0, start, 0, 0);
	while(deq(&a, &v, &pre)) {
		if (a == goal && v == 1) return node[goal][pre][v];
		for (p = tbl+a, i = 0; i < p->len; i++) {
			if ((b = p->to[i]) == pre) continue;
			for (j = -1; j <= 1; j++) {
				if ((v2 = v + j) > p->c[i] || v2 <= 0) continue;
				t = node[a][pre][v] + (double)p->d[i] / (double)v2;
				if (node[b][a][v2] == 0 || t < node[b][a][v2]) node[b][a][v2] = t, enq(t, b, v2, a);
			}
		}
	}
	return -1.0;
}

int main()
{
	int m, a, b, d, c;
	TBL *p;
	double ans;

	while (scanf("%d%d", &size, &m) && size) {
		scanf("%d%d", &start, &goal);
		memset(tbl, 0, sizeof(tbl));
		while (m-- > 0) {
			scanf("%d%d%d%d", &a, &b, &d, &c);
			p = tbl + a, p->to[p->len] = b, p->d[p->len] = d, p->c[p->len] = c, p->len++;
			p = tbl + b, p->to[p->len] = a, p->d[p->len] = d, p->c[p->len] = c, p->len++;
		}
		if ((ans = search()) < 0) puts("unreachable");
		else printf("%.10lf\n", ans);
	}
	return 0;
}