You are given an array of integers a_1,a_2,…,a_n. Find the maximum possible value of a_ia_ja_ka_la_t among all five indices (i, j, k, l, t) (i<j<k<l<t).

Input

The input consists of multiple test cases. The first line contains an integer t (1≤ t≤ 2 ⋅ 10^4) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer n (5≤ n≤ 10^5) — the size of the array.

The second line of each test case contains n integers a_1,a_2,…,a_n (-3× 10^3≤ a_i≤ 3× 10^3) — given array.

It's guaranteed that the sum of n over all test cases does not exceed 2⋅ 10^5.

Output

For each test case, print one integer — the answer to the problem.

Example

Input


4
5
-1 -2 -3 -4 -5
6
-1 -2 -3 1 2 -1
6
-1 0 0 0 -1 -1
6
-9 -7 -5 -3 -2 1


Output


-120
12
0
945

Note

In the first test case, choosing a_1,a_2,a_3,a_4,a_5 is a best choice: (-1)⋅ (-2) ⋅ (-3)⋅ (-4)⋅ (-5)=-120.

In the second test case, choosing a_1,a_2,a_3,a_5,a_6 is a best choice: (-1)⋅ (-2) ⋅ (-3)⋅ 2⋅ (-1)=12.

In the third test case, choosing a_1,a_2,a_3,a_4,a_5 is a best choice: (-1)⋅ 0⋅ 0⋅ 0⋅ (-1)=0.

In the fourth test case, choosing a_1,a_2,a_3,a_4,a_6 is a best choice: (-9)⋅ (-7) ⋅ (-5)⋅ (-3)⋅ 1=945.
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]

####
MOD = 10**9 + 7
YES, NO = "Yes", "No"
from collections import defaultdict as ddic


def solve(N, A):
    NINF = float('-inf')
    INF = float('inf')
    pos = neg = A[0]
    left = [NINF] * N
    right = [NINF] * N
    leftN = [INF] * N
    rightN = [INF] * N
    for i in xrange(1, N):
        x = A[i]
        left[i] = max(x * pos, x * neg)
        leftN[i] = min(x * pos, x * neg)
        if x > pos: pos = x
        if x < neg: neg = x
    pos = neg = A[-1]
    for i in xrange(N - 2, -1, -1):
        x = A[i]
        right[i] = max(x * pos, x * neg)
        rightN[i] = min(x * pos, x * neg)
        if x > pos: pos = x
        if x < neg: neg = x

    for i in xrange(1, N):
        left[i] = max(left[i], left[i - 1])
        leftN[i] = min(leftN[i], leftN[i - 1])
    for i in xrange(N - 2, -1, -1):
        right[i] = max(right[i], right[i + 1])
        rightN[i] = min(rightN[i], rightN[i + 1])

    # print left
    # print leftN
    # print right
    # print rightN

    ans = NINF
    for i in xrange(2, N - 2):
        x = A[i]
        if x == 0:
            ans = max(ans, 0)
        else:
            cands = [
                left[i - 1] * right[i + 1], leftN[i - 1] * right[i + 1],
                left[i - 1] * rightN[i + 1], leftN[i - 1] * rightN[i + 1]
            ]
            # print("!", i, x, cands)
            # print("on", left[i - 1], leftN[i - 1], right[i + 1], rightN[i + 1])
            for cand in cands:
                if cand != INF and cand != NINF:
                    ans = max(ans, x * cand)

    return ans


for TC in xrange(rri()):
    N = rri()
    A = rrm()
    print solve(N, A)