#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <tuple>
#include <algorithm>
#include <iomanip>
#include <cmath>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); ++i)
#define all(c) (c).begin(), (c).end()
const double inf = 1e8, eps = 1e-8;

template<typename T> inline void chmin(T& t, T f){if(t > f)t = f;}

int n, m, p, a, b;
vector<int> t;
vector<vector<pair<int, int> > > G;
vector<vector<double> > mem;

string solve(){
    mem.assign(1<<n, vector<double>(m, inf));
    priority_queue<tuple<double, int, int> > q;
    for(q.emplace(0, 0, a); !q.empty();){
        double c; int used, v;
        tie(c, used, v) = q.top(); q.pop();
        if(mem[used][v] - c < -eps || v == b)continue;
        for(auto u: G[v])rep(i, n)if(!(used >> i & 1)){
            double nc = 1. * u.second / t[i] - c;
            if(mem[used | 1<<i][u.first] <= nc)continue;
            mem[used | 1<<i][u.first] = nc;
            q.emplace(-nc, used | 1<<i, u.first);
        }
    }
    double res = inf;
    rep(i, 1<<n)chmin(res, mem[i][b]);
    stringstream ss;
    if(abs(res - inf) < eps)ss << "Impossible";
    else ss << fixed << setprecision(3) << res;
    return ss.str();
}

int main(){
    while(cin >> n >> m >> p >> a >> b, n|m|p|a|b){
        a--; b--;
        t.assign(n, 0);
        rep(i, n)cin >> t[i];
        G.assign(m, vector<pair<int, int> >());
        rep(i, p){
            int x, y, z;
            cin >> x >> y >> z;
            x--; y--;
            G[x].emplace_back(y, z);
            G[y].emplace_back(x, z);
        }
        cout << solve() << '\n';
    }
    return 0;
}