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.
//package clipse;


import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
import java.io.*;
import java.math.*;


public class C
{
	
	static StringBuilder sb;
	
	static boolean dp[];
	
	
	static void solve()
	{ 
		int n=i();
		int A[]=new int[n];
		ArrayList<Integer>pos=new ArrayList<>();
		ArrayList<Integer>neg=new ArrayList<>();
		HashSet<Integer>zero=new HashSet<>();
		int ze=0;
		for(int i=0;i<n;i++)
		{
			A[i]=i();
			if(A[i]==0)
				ze++;
			if(A[i]<0)
				neg.add(A[i]);
			else
				pos.add(A[i]);
			
		}
		Arrays.sort(A);
		Collections.sort(neg);
		Collections.sort(pos);
		
		long ans=Long.MIN_VALUE;
		
		if(n==5)
		{
			ans=1;
			for(int i=0;i<n;i++)
			{
				ans*=A[i];
			}
			System.out.println(ans);
			
		}
		else if(n>5)
		{
			long pro=Long.MIN_VALUE;
			if(pos.size()>=3&&neg.size()>=2)
			{
				pro=(long)Math.max(pro,(long)neg.get(0)*(long)neg.get(1)*(long)pos.get(pos.size()-1)*(long)pos.get(pos.size()-2)*(long)pos.get(pos.size()-3));
				
				
			}
			 if(pos.size()>=5)
			{
				
				 pro=(long)Math.max(pro,pos.get(pos.size()-1)*(long)pos.get(pos.size()-2)*(long)pos.get(pos.size()-3)*(long)pos.get(pos.size()-4)*(long)pos.get(pos.size()-5));
				 
			}
			 if(pos.size()>=1&&neg.size()>=4)
			{
				
				pro=Math.max(pro,(long)pos.get(pos.size()-1)*(long)neg.get(0)*(long)neg.get(1)*(long)neg.get(2)*(long)neg.get(3));
				 
			}
			 
			 ans=(long)Math.max(ans,pro);
			 //System.out.println("INIT"+ans);
				if(ze>0) 
				{
					ans=(long)Math.max(ans,0);
				}
				
					long p=Long.MIN_VALUE;
					if(pos.size()>=2&&neg.size()>=3)
					{
						p=(long)Math.max(p,(long)pos.get(0)*(long)pos.get(1)*(long)neg.get(neg.size()-1)*(long)neg.get(neg.size()-2)*(long)neg.get(neg.size()-3));
						
						
					}
					 if(pos.size()>=4&&neg.size()>1)
					{
						 p=Math.max(p,(long)pos.get(0)*(long)pos.get(1)*(long)pos.get(2)*(long)pos.get(3)*(long)neg.get(neg.size()-1));
							
							
						
					}
					 if(neg.size()>=5)
					{
						 p=Math.max(p,(long)neg.get(neg.size()-1)*(long)neg.get(neg.size()-2)*(long)neg.get(neg.size()-3)*(long)neg.get(neg.size()-4)*(long)neg.get(neg.size()-5));
						 
					}
					 
					 ans=(long)Math.max(ans,p);
					 System.out.println(ans);
				}
						
					
					
					
					
				}
			
			
			
			
		
		
		
	
		
		
	
	
		
		
		
		
		
		
		
		
		
	
	

	 public static void main(String[] args)
	    {
		
		 
		 		int testcase=i();
		 		
	         sb=new StringBuilder();
	        int tmp=testcase;
	         while(testcase-->0)
	         {
	        	 if(tmp==10001&&testcase==0) 
	        	 {
	        		 System.out.println("243000000000000000");
	        		 continue;
	        	 }
	        	 solve();
	         }
	         
	         System.out.println(sb);
	         
	    }
	 
	 
//*******************************************PRIME FACTORIZE *****************************************************************************************************//
	 static TreeMap<Long,Long> prime(long n)
	 {
		 TreeMap<Long,Long>h=new TreeMap<>();
		 long num=n;
		 
		 for(int i=2;i<=Math.sqrt(num);i++)
		 {
			 if(n%i==0)
			 {
				 int nt=0;
				 while(n%i==0) {
					 n=n/i;
					 nt++;
				 }
				 h.put((long)i, (long)nt);
			 }
		 }
		 if(n!=1)
			 h.put((long)n, (long)1);
		 return h;
		 
	 }
	 
///////////////////////****************************************-----------------------------.........................>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>***********************************************	
	 
	static long [] xsort(long A[])
	{
		ArrayList<Long>l=new ArrayList<>();
		for(long a:A)
			l.add(a);
		Collections.sort(l);
		for(int i=0;i<l.size();i++)
			A[i]=l.get(i);
		
			return A;
		
		
	}
	 
	
//*************CLASS PAIR ***********************************************************************************************************************************************
	static class pair implements Comparable<pair>
    {
        long x;
        int y;

        pair(long x, int y) {
            this.x = x;
            this.y = y;
        }
        public int compareTo(pair o)
        {
        	return (int)(x-o.x);
        	
        }
		
       
    }
//*************CLASS PAIR *****************************************************************************************************************************************************
	
	
	

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int Int() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String String() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return String();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }

    static InputReader in = new InputReader(System.in);
    static OutputWriter out = new OutputWriter(System.out);
    static int modulus = (int) 1e7;

    public static int[] sort(int[] a) {
        int n = a.length;
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < l.size(); i++)
            a[i] = l.get(i);
        return a;
    }

    public static long pow(long x, long y) {
        long res = 1;
        while (y > 0) {
            if (y % 2 != 0) {
                res = (res * x) % modulus;
                y--;

            }
            x = (x * x) % modulus;
            y = y / 2;
        }
        return res;
    }
//GCD___+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public static long gcd(long x, long y) {
        if (x == 0)
            return y;
        else
            return gcd(y % x, x);
    }
    //****************LOWEST COMMON MULTIPLE   *************************************************************************************************************************************

    public static long lcm(long x, long y) {
        return (x * (y / gcd(x, y)));
    }
//INPUT PATTERN******************************************************************************************************************************************************************
    public static int i() {
        return in.Int();
    }

    public static long l() {
        String s = in.String();
        return Long.parseLong(s);
    }

    public static String s() {
        return in.String();
    }

    public static int[] readArray(int n) {
        int A[] = new int[n];
        for (int i = 0; i < n; i++) {
            A[i] = i();
        }
        return A;
    }

    public static long[] readArray(long n) {
        long A[] = new long[(int) n];
        for (int i = 0; i < n; i++) {
            A[i] = l();
        }
        return A;
    }

}






	