#include<stdio.h>
int main(){
  int n,m,i,j,k,mi,mj,mk,s,e;
  double min;
  while(scanf("%d %d",&n,&m),n||m){
    int d[31][31]={0};
    int l[31][31]={0};
    scanf("%d %d",&mi,&e);
    while(m--){
      scanf("%d %d %d %d",&i,&j,&k,&s);
      d[i][j]=d[j][i]=k;
      l[i][j]=l[j][i]=s;
    }
    double c[31][31][31]={0};
    int f[31][31][31]={0};//printf("a\n");
    mj=mk=0;
    while(mi-e||mk-1){
      f[mi][mj][mk]=1;
      for(i=1;i<=n;i++){
	if(i==mj||d[mi][i]==0)continue;
	for(j=mk-1;j<mk+2;j++){
	  if(j<1||l[mi][i]<j||f[i][mj][j])continue;
	  if(c[i][mi][j]==0||c[i][mi][j]>c[mi][mj][mk]+1.0*d[mi][i]/j){
	    c[i][mi][j]=c[mi][mj][mk]+1.0*d[i][mi]/j;
	  }
	}
      }
      min=100000000;
      for(i=1;i<=n;i++){
	for(j=1;j<=n;j++){
	  for(k=1;k<=30;k++){
	    if(f[i][j][k]||c[i][j][k]==0)continue;
	    if(min>c[i][j][k])min=c[mi=i][mj=j][mk=k];
	  }
	}
      }
      if(min==100000000)break;
    }
    if(min-100000000)printf("%f\n",min);
    else             printf("unreachable\n");
  }
  return 0;
}