You are given 4n sticks, the length of the i-th stick is a_i.

You have to create n rectangles, each rectangle will consist of exactly 4 sticks from the given set. The rectangle consists of four sides, opposite sides should have equal length and all angles in it should be right. Note that each stick can be used in only one rectangle. Each stick should be used as a side, you cannot break the stick or use it not to the full length.

You want to all rectangles to have equal area. The area of the rectangle with sides a and b is a ⋅ b.

Your task is to say if it is possible to create exactly n rectangles of equal area or not.

You have to answer q independent queries.

Input

The first line of the input contains one integer q (1 ≤ q ≤ 500) — the number of queries. Then q queries follow.

The first line of the query contains one integer n (1 ≤ n ≤ 100) — the number of rectangles.

The second line of the query contains 4n integers a_1, a_2, ..., a_{4n} (1 ≤ a_i ≤ 10^4), where a_i is the length of the i-th stick.

Output

For each query print the answer to it. If it is impossible to create exactly n rectangles of equal area using given sticks, print "NO". Otherwise print "YES".

Example

Input


5
1
1 1 10 10
2
10 5 2 10 1 1 2 5
2
10 5 1 10 5 1 1 1
2
1 1 1 1 1 1 1 1
1
10000 10000 10000 10000


Output


YES
YES
NO
YES
YES

 import java.util.*;
import java.io.*;
import java.lang.*;
 
public final class codeoforces59
{	
	public static void main(String args[])throws IOException
	{
		
	 try{		
	 //takign input through IO
	 InputReader in = new InputReader(System.in);
     OutputWriter out = new OutputWriter(System.out);
	 // three rectangles 
	 // 11 22 55 1010
	 int T = in.readInt();
	 while(T>0)
	 {
		 int n = in.readInt(),i,j,flag1= 1,flag2 = 1;
		 int val[] = IOUtils.readIntArray(in,4*n),a;
		 Arrays.parallelSort(val);
		 a = val[0]*val[val.length-1];
		 //out.printLine(Arrays.toString(val));
		 //out.flush();
		 for(i=1,j = val.length-2;i<j && i<val.length && j < val.length ;i++,j--)
		 {
				
				if(i%2!=0 && val[i-1]!=val[i]){flag2 = 0;
				break;}
			 
				if(val[i]*val[j]!=a)
				{
					flag1=0;
					break;
				}
		 }
		 
		 if(flag1==0 || flag2==0)
		 {out.printLine("NO");
		 }else{out.printLine("YES");}
		 out.flush();
		 T--;
	 }
	 out.close();
	}catch(Exception e){
	 e.printStackTrace();
	}
	
	}
	
}
 
 
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 readInt()
    {
        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 readString()
    {
        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 double readDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-')
		{
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.')
		{
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, readInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.')
		{
            c = read();
            double m = 1;
            while (!isSpaceChar(c))
			{
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }
	
    public long readLong()
	{
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-')
		{
            sgn = -1;
            c = read();
        }
        long 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 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 readString();
    }
 
    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}
 
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();
    }
 
}
 
/*
>>USAGE
 
//initialize
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
 
//read int
   int i = in.readInt();
//read string
   String s = in.readString();
//read int array of size N
   int[] x = IOUtils.readIntArray(in,N);
//printline
   out.printLine("X");
 
 
//flush output
   out.flush();
 
//remember to close the
//outputstream, at the end
   out.close();
*/
 
 
class IOUtils
	{
		public static int[] readIntArray(InputReader in, int size)
		{
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
		}
		
		
		
	}