#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define INF ((1LL<<62)-(1LL<<31))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)((n>>m)&1)

ll d[40][40];
ll a[9];
double ss[520][40];

int main(){
	int n,m,s,t;
	while(scanf("%d%*d%d%d%d",&n,&m,&s,&t),n){
		rep(i,0,n)scanf("%lld",a+i);
		rep(i,1,31)rep(j,1,31)d[i][j]=(i==j?0:INF);
		rep(_,0,m){
			ll x,y,z;
			scanf("%d%d%d",&x,&y,&z);
			d[x][y]=d[y][x]=z;
		}
		rep(k,0,1<<n)rep(i,1,31)ss[k][i]=INF;
		ss[0][s]=0;
		rep(k,0,1<<n)rep(i,1,31)if(ss[k][i]!=INF){
			rep(j,1,31)if(d[i][j]!=INF)rep(b,0,n)if(!bit(k,b)){
				ss[k|1<<b][j]=min(ss[k|1<<b][j],ss[k][i]+(double)d[i][j]/a[b]);
			}
		}
		double ans=INF;
		rep(k,0,1<<n)ans=min(ans,ss[k][t]);
		if(ans>1e9)puts("Impossible");
		else printf("%.9f\n",ans);
	}
}
