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.io.*;
import java.util.*;

public class B {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static FastReader s = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);

    private static int[] rai(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextInt();
        }
        return arr;
    }

    private static int[][] rai(int n, int m) {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                arr[i][j] = s.nextInt();
            }
        }
        return arr;
    }

    private static long[] ral(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextLong();
        }
        return arr;
    }

    private static long[][] ral(int n, int m) {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                arr[i][j] = s.nextLong();
            }
        }
        return arr;
    }

    private static int ri() {
        return s.nextInt();
    }

    private static long rl() {
        return s.nextLong();
    }

    private static String rs() {
        return s.next();
    }

    static int gcd(int a,int b)
    {
        if(b==0)
        {
            return a;
        }
        return gcd(b,a%b);
    }

    static long gcd(long a,long b)
    {
        if(b==0)
        {
            return a;
        }
        return gcd(b,a%b);
    }
    static boolean isPrime(int n) {
        //check if n is a multiple of 2
        if (n % 2 == 0) return false;
        //if not, then just check the odds
        for (int i = 3; i <= Math.sqrt(n); i += 2) {
            if (n % i == 0)
                return false;
        }
        return true;
    }


    static long getChanges(List<Long> list,long mid)
    {
        long count=0;
        int i=0;
        for( i=0;i<list.size();i++)
        {
            long val= (long) Math.pow(mid,i);
            count+=Math.abs(list.get(i)-val);
        }
        return count;
    }
//    static boolean check(long p,long f,)
    public static void main(String[] args) {
        StringBuilder ans = new StringBuilder();
        int t = ri();
//        int t=1;
        while (t-- > 0)
        {
            int n=ri();
            long[] arr=ral(n);
            if(n==5)
            {
                long prod=1;
                for(long i:arr)
                {
                    prod*=i;

                }
                ans.append(prod).append("\n");
                continue;
            }

            List<Long> pos=new ArrayList<>();
            List<Long> neg=new ArrayList<>();

            int z=0;
            for(long i:arr)
            {
                if(i>0)
                {
                    pos.add(i);
                }
                else if(i<0)
                {
                    neg.add(i);
                }
                else
                {
                    z++;
                }
            }

            pos.sort((o1, o2) -> (int) (o2-o1));
            Collections.sort(neg);

//            System.out.println(pos+" "+neg);

            if(pos.size()==0)
            {
                if(z>0)
                {
                    ans.append("0\n");
                }
                else
                {
                    long prod=1;
                    for(int i=neg.size()-1;i>=neg.size()-5;i--)
                    {
                        prod*=neg.get(i);
                    }
                    ans.append(prod).append("\n");
                }
            }
            else if(neg.size()==0)
            {
                if(pos.size()>=5)
                {
                    long prod=1;
                    for(int i=0;i<5;i++)
                    {
                        prod*=pos.get(i);
                    }
                    ans.append(prod).append("\n");

                }
                else {
                    ans.append("0\n");
                }
            }
            else if(pos.size()+neg.size()<5)
            {
                ans.append("0\n");
            }
            else
            {
                int size=5;
                if(pos.size()>=5)
                {
                    size=5;
                }
                else if(pos.size()>=3)
                {
                    size=3;
                }
                else
                {
                    size=1;
                }

                long maxProd=0;
                for(int val=size;val>=1;val-=2)
                {
                    long prod=1;
                    for(int i=0;i<val;i++)
                    {
                        prod*=pos.get(i);
                    }
                    int left=5-val;
                    if(neg.size()>=left)
                    {
                        for(int i=0;i<left;i++)
                        {
                            prod*=neg.get(i);
                        }
                        maxProd=Math.max(maxProd,prod);
                    }
                }
                ans.append(maxProd).append("\n");

            }
//            {
//                if(pos.size()<=2 && neg.size()>=4)
//                {
//                        int prod = 1;
//                        for (int i = 0; i < 4; i++) {
//                            prod *= neg.get(i);
//                        }
//                        prod *= pos.get(0);
//
//                        ans.append(prod).append("\n");
//
//                }
//                else {
//                    int left = 5;
//
//                    int i = 0, j = 0;
//                    int prod = 1;
//                    while ((i < pos.size() || j < neg.size()) && left > 1) {
//                        int posProd = Integer.MIN_VALUE;
//                        if (i < pos.size() - 1) {
//                            posProd = pos.get(i) * pos.get(i + 1);
//                        }
//
//                        int negProd = Integer.MIN_VALUE;
//                        if (j < neg.size() - 1) {
//                            negProd = neg.get(j) * neg.get(j + 1);
//                        }
////                    System.out.println(posProd+" "+negProd);
//                        if (posProd >= negProd) {
//                            i += 2;
//                            prod *= posProd;
//                            left -= 2;
//                        } else {
//                            j += 2;
//                            prod *= negProd;
//                            left -= 2;
//
//                        }
//                    }
//
//                    assert left == 1;
//
//                    if (i < pos.size()) {
//                        prod *= pos.get(i);
//                    } else if (z > 0) {
//                        prod = 0;
//                    } else {
//                        prod *= neg.get(neg.size() - 1);
//                    }
//                    ans.append(prod).append("\n");
//                }
//            }
        }

        out.print(ans.toString());
        out.flush();

    }

}
