while True:

    N, M, P, A, B = list(map(int, input().split()))

    if not (N | M | P | A | B):

        break

    A, B = A - 1, B - 1

    T = [int(x) for x in input().split()]

    dp = [[float("inf")] * M for _ in range(1 << N)]

    dp[0][A] = 0

    D = [[float('inf')] * M for _ in range(M)]

    for _ in range(P):

        s, t, c = list(map(int, input().split()))

        s, t = s - 1, t - 1

        D[s][t] = D[t][s] = c



    for state in range(1 << N):

        for i in range(M):

            for j in range(M):

                for k in range(N):

                    if not (state >> k & 1):

                        next_s = state | (1 << k)

                        dp[next_s][j] = min(dp[next_s][j], dp[state][i] + D[i][j] / T[k])

    ans = float('inf')

    for state in range(1 << N):

        ans = min(ans, dp[state][B])

    print(("Impossible" if ans == float("inf") else "{:.020f}".format(ans)))
while True:

    N, M, P, A, B = list(map(int, input().split()))

    if not (N | M | P | A | B):

        break

    A, B = A - 1, B - 1

    T = [int(x) for x in input().split()]

    dp = [[float("inf")] * M for _ in range(1 << N)]

    dp[0][A] = 0

    edges = []

    for _ in range(P):

        s, t, c = list(map(int, input().split()))

        s, t = s - 1, t - 1

        edges.append((s, t, c))

        edges.append((t, s, c))



    for state in range(1 << N):

        for s, t, c in edges:

            for k in range(N):

                if not (state >> k & 1):

                    next_s = state | (1 << k)

                    dp[next_s][t] = min(dp[next_s][t], dp[state][s] + c / T[k])

    ans = float('inf')

    for state in range(1 << N):

        ans = min(ans, dp[state][B])

    print(("Impossible" if ans == float("inf") else "{:.020f}".format(ans)))
while True:
    N, M, P, A, B = list(map(int, input().split()))
    if not (N | M | P | A | B):
        break
    A, B = A - 1, B - 1
    T = [int(x) for x in input().split()]
    dp = [[float("inf")] * M for _ in range(1 << N)]
    dp[0][A] = 0
    D = [[float("inf")] * M for _ in range(M)]
    for _ in range(P):
        s, t, c = list(map(int, input().split()))
        s, t = s - 1, t - 1
        D[s][t] = D[t][s] = c
    for state in range(1 << N):
        for i in range(M):
            for j in range(M):
                for k in range(N):
                    if not (state >> k & 1):
                        next_s = state | (1 << k)
                        dp[next_s][j] = min(
                            dp[next_s][j], dp[state][i] + D[i][j] / T[k]
                        )
    ans = float("inf")
    for state in range(1 << N):
        ans = min(ans, dp[state][B])
    print(("Impossible" if ans == float("inf") else "{:.020f}".format(ans)))

while True:
    N, M, P, A, B = list(map(int, input().split()))
    if not (N | M | P | A | B):
        break
    A, B = A - 1, B - 1
    T = [int(x) for x in input().split()]
    dp = [[float("inf")] * M for _ in range(1 << N)]
    dp[0][A] = 0
    edges = []
    for _ in range(P):
        s, t, c = list(map(int, input().split()))
        s, t = s - 1, t - 1
        edges.append((s, t, c))
        edges.append((t, s, c))
    for state in range(1 << N):
        for s, t, c in edges:
            for k in range(N):
                if not (state >> k & 1):
                    next_s = state | (1 << k)
                    dp[next_s][t] = min(dp[next_s][t], dp[state][s] + c / T[k])
    ans = float("inf")
    for state in range(1 << N):
        ans = min(ans, dp[state][B])
    print(("Impossible" if ans == float("inf") else "{:.020f}".format(ans)))

-    D = [[float("inf")] * M for _ in range(M)] +    edges = [] -        D[s][t] = D[t][s] = c +        edges.append((s, t, c)) +        edges.append((t, s, c)) -        for i in range(M): -            for j in range(M): -                for k in range(N): -                    if not (state >> k & 1): -                        next_s = state | (1 << k) -                        dp[next_s][j] = min( -                            dp[next_s][j], dp[state][i] + D[i][j] / T[k] -                        ) +        for s, t, c in edges: +            for k in range(N): +                if not (state >> k & 1): +                    next_s = state | (1 << k) +                    dp[next_s][t] = min(dp[next_s][t], dp[state][s] + c / T[k])