#include<bits/stdc++.h>
using namespace std;

#define lint long long
#define P pair<int, int>
#define LLP pair<long long, long long>
#define REP(i, x, n) for(int i = (x), i##_len = (int)(n) ; i < i##_len ; ++i)
#define rep(i, n) for(int i = 0, i##_len = (int)(n) ; i < i##_len ; ++i)
#define reps(i, n) for(int i = 1, i##_len = (int)(n) ; i <= i##_len ; ++i)
#define rrep(i, n) for(int i = (int)(n) - 1 ; i >= 0 ; --i)
#define rreps(i, n) for(int i = (int)(n) ; i > 0 ; --i)
#define SORT(x) sort((x).begin(), (x).end())
#define SORT_INV(x) sort((x).rbegin(), (x).rend())

const int IINF = (1 << 30) - 1;
const long long LLINF = 1LL << 61;
const long long MOD = 1000000007LL;
const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};
const double EPS = 1e-8;

struct fractions{
    long long numerator, denominator;

    long long _gcd(long long _x, long long _y){
        long long _r = _x % _y;
        while(_r != 0LL){
            _x = _y;
            _y = _r;
            _r = _x % _y;
        }
        return _y;
    }

    fractions(){
        numerator = 0;
        denominator = 1;
    }

    fractions(long long _x){
        numerator = _x;
        denominator = 1;
    }

    fractions(long long _x, long long _y){
        if(_y == 0LL){
            _y = 1;
        }else if(_y < 0LL){
            _x = -_x;
            _y = -_y;
        }
        long long g = _gcd(abs(_x), _y);
        numerator = _x / g;
        denominator = _y / g;
    }

    void print(void){
        cout << numerator << " / " << denominator << endl;
        return;
    }

    void print(int _f){
        cout << fixed << setprecision(_f) << (double)numerator / (double)denominator << endl;
        return;
    }

    fractions &operator+=(fractions &rhs){
        if(denominator < 0LL){
            numerator = -numerator;
            denominator = -denominator;
        }
        if(rhs.denominator < 0LL){
            rhs.numerator = -rhs.numerator;
            rhs.denominator = -rhs.denominator;
        }

        long long g = _gcd(denominator, rhs.denominator);
        long long l = denominator / g * rhs.denominator;
        numerator *= l / denominator;
        denominator = l;
        numerator += rhs.numerator * (l / rhs.denominator);

        g = _gcd(abs(numerator), denominator);
        numerator /= g;
        denominator /= g;

        return *this;
    }

    fractions &operator-=(fractions &rhs){
        fractions nrhs(-rhs.numerator, rhs.denominator);
        return *this += nrhs;
    }

    fractions &operator*=(fractions &rhs){
        if(denominator < 0LL){
            numerator = -numerator;
            denominator = -denominator;
        }
        if(rhs.denominator < 0LL){
            rhs.numerator = -rhs.numerator;
            rhs.denominator = -rhs.denominator;
        }

        long long g1 = _gcd(abs(numerator), rhs.denominator);
        numerator /= g1;

        long long g2 = _gcd(abs(rhs.numerator), denominator);
        denominator /= g2;

        numerator *= rhs.numerator / g2;
        denominator *= rhs.denominator / g1;

        return *this;
    }

    fractions &operator/=(fractions &rhs){
        fractions nrhs(rhs.denominator, rhs.numerator);
        return *this *= nrhs;
    }

    fractions operator+(fractions &rhs){
        return fractions(*this) += rhs;
    }

    fractions operator-(fractions &rhs){
        return fractions(*this) -= rhs;
    }

    fractions operator*(fractions &rhs){
        return fractions(*this) *= rhs;
    }

    fractions operator/(fractions &rhs){
        return fractions(*this) /= rhs;
    }

    bool operator==(const fractions &rhs) const {
        long long _a = numerator, _b = denominator, _c = rhs.numerator, _d = rhs.denominator;
        return _a * _d == _b * _c;
    }

    bool operator!=(const fractions &rhs) const {
        return !(*this == rhs);
    }

    bool operator<(const fractions &rhs) const {
        long long _a = numerator, _b = denominator, _c = rhs.numerator, _d = rhs.denominator;
        return _a * _d < _b * _c;
    }

    bool operator<=(const fractions &rhs) const {
        return (*this < rhs) || (*this == rhs);
    }

    bool operator>(const fractions &rhs) const {
        return !(*this <= rhs);
    }

    bool operator>=(const fractions &rhs) const {
        return !(*this < rhs);
    }
};

struct edge{
    int to;
    fractions dis;
};

struct node{
    int id, S;
    fractions cost;

    bool operator<(const node &rhs) const {
        return cost > rhs.cost;
    }
};

template<typename T>
bool chmin(T &_a, T _b){
    if(_a > _b){
        _a = _b;
        return true;
    }else{
        return false;
    }
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n, m, p, a, b;
    while(cin >> n >> m >> p >> a >> b, m){
        --a;
        --b;

        vector<fractions> t(n);
        rep(i, n){
            lint tmp;
            cin >> tmp;
            t[i] = tmp;
        }

        vector< vector<edge> > g(m);
        rep(i, p){
            int x, y;
            lint z;
            cin >> x >> y >> z;
            g[--x].push_back({--y, z});
            g[y].push_back({x, z});
        }

        vector< vector<fractions> > cost(m, vector<fractions>(1 << n, IINF));
        priority_queue<node> que;
        que.push({a, 0, 0});
        while(!que.empty()){
            node now = que.top();
            que.pop();
            if(!chmin(cost[now.id][now.S], now.cost)){
                continue;
            }
            rep(i, n){
                if(now.S >> i & 1){
                    continue;
                }
                int nS = now.S ^ (1 << i);
                for(auto e : g[now.id]){
                    if(cost[e.to][nS] > e.dis / t[i] + now.cost){
                        que.push({e.to, nS, e.dis / t[i] + now.cost});
                    }
                }
            }
        }

        fractions ans(IINF);
        rep(i, 1 << n){
            chmin(ans, cost[b][i]);
        }

        if(ans < fractions(IINF)){
            ans.print(3);
        }else{
            cout << "Impossible" << endl;
        }
    }

    return 0;
}


Measured memory_bytes: 25304