#include<iostream>
#include<vector>
#include<queue>
#include<cstdio>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

typedef pair<double, pair<int, int> > State;

int main() {
  while (true) {
    int n, m, p, a, b, t[10];
    cin >> n >> m >> p >> a >> b;
    if (n == 0 && m == 0 && p == 0 && a == 0 && b == 0) break;
    --a; --b;
    rep (i, n) cin >> t[i];
    vector<pair<int, double> > edge[m];
    rep (i, p) {
      int x, y, z;
      cin >> x >> y >> z;
      --x; --y;
      edge[x].push_back(make_pair(y, z));
      edge[y].push_back(make_pair(x, z));
    }
    priority_queue<State, vector<State>, greater<State> > que;
    que.push(make_pair(0, make_pair(a, (1 << n) - 1)));
    double dis[30][1 << 8];
    rep (i, 30) rep (j, 1 << 8) dis[i][j] = 1e100;
    while (!que.empty()) {
      State now = que.top();
      que.pop();
      if (dis[now.second.first][now.second.second] <= now.first) continue;
      dis[now.second.first][now.second.second] = now.first;
      rep (i, edge[now.second.first].size()) {
	rep (j, n) if (now.second.second & 1 << j) {
	  State state;
	  state.first = now.first + edge[now.second.first][i].second / t[j];
	  state.second.first = edge[now.second.first][i].first;
	  state.second.second = now.second.second ^ 1 << j;
	  que.push(state);
	}
      }
    }
    double res = 1e99;
    rep (i, 1 << 8) res = min(res, dis[b][i]);
    if (res == 1e99) cout << "Impossible" << endl;
    else printf("%.12f\n", res);
  }
  return 0;
}