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


public class Main {
    final static long MOD = 1000000007;
    final static long bb = -100000000;

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        int t = fs.nextInt();

        while(t > 0) {
            t-=1;
            int n = fs.nextInt();
            int a[] = fs.nextIntArray(n);

            ArrayList<Pair> numbers = new ArrayList<>();

            for (int i = 0; i < n; i++) {
                numbers.add(new Pair(a[i], 0));
            }

            numbers.sort((o1, o2) -> Long.compare(Math.abs(o2.number), Math.abs(o1.number)));
            long mul = 1;
            for(int i = 0; i < 5; i++) {
                mul *= numbers.get(i).number;
            }

            if(mul < 0) {
                //find last positive replace it with a negative
                long new_mul = 1;
                long g_mul = Long.MIN_VALUE;
                for(int i = 0; i < 5; i++) {
                    long local_mul = Long.MIN_VALUE;
                    if(numbers.get(i).number != 0) {
                        new_mul = mul / numbers.get(i).number;
                        for (int j = 5; j < n; j++) {
                            if(numbers.get(j).number == 0) {
                                local_mul  = Math.max(0, local_mul);
                            } else {
                                new_mul *= numbers.get(j).number;
                                local_mul = Math.max(new_mul, local_mul);
                                new_mul /= numbers.get(j).number;
                            }
                        }
                    }
                    g_mul = Math.max(g_mul, local_mul);
                }
                mul = Math.max(g_mul, mul);
            }

            if(mul < 0){
                long new_mul = 1;
                for(int i = numbers.size()-1; i >= numbers.size()-5; i--) {
                    new_mul *= numbers.get(i).number;
                }
                mul = Math.max(mul, new_mul);
            }
            out.println(mul);

        }
        out.flush();
        out.close();
    }

    static class Pair{
        long number;
        int sign;

        Pair(long number, int sign) {
            this.number = number;
            this.sign = sign;
        }
    }

    public static String rString(String s) {
        return new StringBuilder(s).reverse().toString();
    }

    public static int powoftwo(long n){
        int count = 0;
        while(n != 0) {
            n >>= 1;
            count++;
        }
        return count - 1;
    }

    public static void rotate(int[] nums, int k) {
        int n = nums.length;
        if(k > 0) {
            for(int j = 0; j < k; j++) {
                for (int i = 0; i < n; i++) {
                    int temp = nums[(i + k) % n];
                    nums[(i + k) % n] = nums[i];
                    nums[i] = temp;
                }
            }
        }
    }


    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try {
                br = new BufferedReader(new InputStreamReader(System.in));
                // br = new BufferedReader(new FileReader("chat.txt"));
                st = new StringTokenizer("");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        public String next() {
            if (st.hasMoreTokens())
                return st.nextToken();
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return st.nextToken();
        }

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

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

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

        public String nextLine() {
            String line = "";
            try {
                line = br.readLine();
            } catch (Exception e) {
                e.printStackTrace();
            }
            return line;
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public Integer[] nextIntegerArray(int n) {
            Integer[] a = new Integer[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        public char[] nextCharArray() {
            return nextLine().toCharArray();
        }
    }

}

/*class Pair implements Comparable<Pair> {

    int V;
    int H;

    public Pair(int count, int val) {
        this.V = count;
        this.H = val;
    }

    public void setV(int v) {
        V = v;
    }

    public void setH(int h) {
        H = h;
    }

    @Override
    public int compareTo(Pair o) {
         if(this.V != o.V)
            return Integer.compare(this.V, o.V);
         else
             return Integer.compare(this.H, o.H);
    }

    public boolean equals(Pair o) {
        return this.H == o.H && this.V == o.V;
    }
}*/

class Pair {

    int V;
    int H;

    public Pair(int x, int y) {
        this.V = x;
        this.H = y;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Pair)) return false;
        Pair key = (Pair) o;
        return V == key.V && H == key.H;
    }

    @Override
    public int hashCode() {
        int result = V;
        result = 31 * result + H;
        return result;
    }

}

