#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <functional>
#include <bitset>

using namespace std;
using lint = long long int;
long long int INF = 1001001001001001LL;
int inf = 1000000007;
long long int MOD = 1000000007LL;
double PI = 3.1415926535897932;

template<typename T1,typename T2>inline void chmin(T1 &a,const T2 &b){if(a>b) a=b;}
template<typename T1,typename T2>inline void chmax(T1 &a,const T2 &b){if(a<b) a=b;}

#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()

/* do your best */

// verified : http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A
// 負辺があると動作しない?
// O(E log V)
template<typename T>
vector<T> dijkstra(vector<vector<pair<int, T>>> &g, int s){
     
  int n = g.size();
  // numeric_limits がうまく使えない場合は自分で INF を定義する.
  const auto inf = numeric_limits<T>::max();
  vector<T> dist(n, inf);

  using P = pair<T, int>;
  // 小さい順に取り出せる
  priority_queue<P, vector<P>, greater<P>> que;
  dist[s] = 0.0;
  que.emplace(dist[s], s);
  while(!que.empty()){
    T cost;
    int node;
    tie(cost, node) = que.top();
    que.pop();
    if(dist[node] < cost) continue;
    for(auto &e : g[node]){
      auto next_cost = cost + e.second;
      int next_node = e.first;
      if(dist[next_node] <= next_cost) continue;
      dist[next_node] = next_cost;
      que.emplace(next_cost, next_node);
    }
  }

  return dist;
}

int main() {
  
  while (1) {
    int p, n, m, s, gg; cin >> p >> n >> m >> s >> gg;
    if (p == 0) break;
    s--;
    gg--;
    vector<double> t(p);
    for (int i = 0; i < p; i++) {
      cin >> t[i];
    }
    
    vector<int> x(m);
    vector<int> y(m);
    vector<double> z(m);
    vector<vector<pair<int, double>>> orig(n);
    for (int i = 0; i < m; i++) {
      cin >> x[i] >> y[i] >> z[i];
      x[i]--;
      y[i]--;
      orig[x[i]].push_back({y[i], z[i]});
      orig[y[i]].push_back({x[i], z[i]});
    }
    
    vector<vector<int>> toNode(n, vector<int> ((1 << p), 0));

    int node = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < (1 << p); j++) {

        // cerr << "[" << i << "][" << j << "]" << endl;
        toNode[i][j] = node;
        node++;
      }
    }

    vector<vector<pair<int, double>>> g(node);

    for (int u = 0; u < n; u++) {
      for (int bit = 0; bit < (1 << p); bit++) {
        int curNode = toNode[u][bit];
        // i から出てる辺を総なめ
        for (auto e : orig[u]) {
          int v;
          double dist;
          tie(v, dist) = e;

          // u -> v

          // どの馬券を使うか
          for (int i = 0; i < p; i++) {
            // 使ってないなら
            if (!((1 << i) & bit)) {
              int nxtBit = bit | (1 << i);
              // int nxtNode = toNode[v][nxtBit];
              int nxtNode = toNode.at(v).at(nxtBit);
              // cerr << v << " " << bitset<2>(nxtBit) << endl;
              // cerr << "nxtNode = " << nxtNode << endl;
              double cost = dist / t[i];
              g[curNode].push_back({nxtNode, cost});
            }
          }
        }
      }
    }

    int S = toNode[s][0];
    
    auto res = dijkstra(g, S);
    double ans = 1e15;
    for (int bit = 0; bit < (1 << p); bit++) {
      int G = toNode[gg][bit];
      ans = min(ans, res[G]);
    }

    if (ans >= 1e15 - 100) {
      cout << "Impossible" << endl;
    } else {
      printf("%.10f\n", ans);
    }

  }


  return 0;
}



Measured memory_bytes: 24572