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.

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class MaximumProduct {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int t = scanner.nextInt();

        for (int i = 0; i < t; i++) {

            int n = scanner.nextInt();
            long[] arr = new long[n];
            ArrayList<Long> PosArr = new ArrayList<>();
            ArrayList<Long> NegArr = new ArrayList<>();
            ArrayList<Long> MaxArr = new ArrayList<>();


            long countPos = 0, countNeg = 0, sum = 1, firstNegValue = Integer.MIN_VALUE, max = 0, maxIndex = 0;
            for (int j = 0; j < n; j++) {
                arr[j] = scanner.nextInt();
                countPos = countPos + (arr[j] >= 0 ? 1 : 0);
                countNeg = countNeg + (arr[j] < 0 ? 1 : 0);
                if (arr[j] < 0 && firstNegValue < arr[j]) {
                    firstNegValue = arr[j];
                }

            }

            Arrays.sort(arr);

            if (arr.length == 5){
                sum = arr[0] * arr[1] * arr[2] * arr[3] * arr[4];
                System.out.println(sum);
                continue;
            }

            if (countNeg != 0 && countPos == 0) {
                sum = arr[arr.length - 1] * arr[arr.length - 2] * arr[arr.length - 3] * arr[arr.length - 4] *arr[arr.length - 5] ;
                System.out.println(sum);
                continue;
            }

            if (countPos != 0 && countNeg == 0) {
                sum = arr[arr.length - 1] * arr[arr.length - 2] * arr[arr.length - 3] * arr[arr.length - 4] * arr[arr.length - 5];
                System.out.println(sum);
                continue;
            }

            max = arr[arr.length - 1];

            for (int j = 0, k = arr.length - 2; j < 4; j++, k--) {
                if (arr[k] >= 0) {
                    PosArr.add(arr[k]);
                } else {
                    break;
                }
            }

            for (int j = 0; j < 4; j++) {
                if (arr[j] < 0) {
                    NegArr.add(arr[j]);
                } else {
                    break;
                }
            }


            if (PosArr.size() == 4) {
                MaxArr.add(PosArr.get(0) * PosArr.get(1) * PosArr.get(2) * PosArr.get(3));
            }

            if (NegArr.size() == 4) {
                MaxArr.add((NegArr.get(0) * NegArr.get(1) * NegArr.get(2) * NegArr.get(3)));
            }


            Collections.sort(PosArr);
            Collections.sort(NegArr);

            if (PosArr.size() >= 2 && NegArr.size() >= 2) {
                MaxArr.add(PosArr.get(PosArr.size() - 1) * PosArr.get(PosArr.size() - 2) * NegArr.get(0) * NegArr.get(1));
            }


            Collections.sort(MaxArr);

            System.out.println(max * MaxArr.get(MaxArr.size() - 1));

//            if (countPos >= 3) {
//                int firstSum = arr[0] * arr[1], secondSum = arr[arr.length - 1] * arr[arr.length - 2], lastPostValue = 0;
//
//                if (firstSum >= secondSum) {
//                    sum = firstSum;
//                    firstSum = arr[2] * arr[3];
//                    sum *= Math.max(firstSum, secondSum);
//                    lastPostValue = (firstSum >= secondSum) ? arr[arr.length - 1] : arr[arr.length - 3];
//                } else {
//                    sum = secondSum;
//                    secondSum = arr[arr.length - 3] * arr[arr.length - 4];
//                    sum *= Math.max(firstSum, secondSum);
//                    lastPostValue = (firstSum >= secondSum) ? arr[arr.length - 3] : arr[arr.length - 5];
//                }
//                System.out.println((Math.max((firstNegValue * sum), (lastPostValue * sum))));
//            } else {
//                System.out.println(arr[0] * arr[1] * arr[2] * arr[3] * arr[arr.length - 1]);
//
//            }


        }
    }
}
