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


//Mann Shah [ DAIICT ].
//fast io

public class Main {
	public static int mod = (int) (1e9+7);
	static InputReader in;
    static PrintWriter out;
    
    
    
    
		public static void main(String args[] )  {
			
		  in = new InputReader(System.in);
		  out = new PrintWriter(System.out);
	      	
		  int q = in.nextInt();
		  while(q-->0) {
			  int n = in.nextInt();
			  int[] a = new int[4*n];
			  int[] f = new int[100000];
			  ArrayList<Integer> ad = new ArrayList();
			  for(int i=0;i<4*n;i++) {
				  a[i]=in.nextInt();
				  f[a[i]]++;
				  if(f[a[i]]%2==0) {
					  ad.add(a[i]);
				  }
			  }
			  int ff=0;
			  for(int i=0;i<4*n;i++) {
				  if( f[a[i]]%2 !=0) {
					  ff=1;
					  break;
				  }
			  }
			  
			  int nn = ad.size();
			 // out.println(ad);
			  
			  if(nn!=0) {
			  
			  Collections.sort(ad);
			  
			  int pro=ad.get(0)*ad.get(nn-1);
			  for(int i=1;i<nn;i++) {
				  if(ad.get(i)*ad.get(nn-1-i) != pro) {
					  ff=1;
					  break;
				  }
			  }
			  }
			  if(ff==0) {
				  out.println("YES");
			  }
			  else {
				  out.println("NO");
			  }
			  
					  
		  }
		  
	     out.close();
		}
		
		

	 static class InputReader
	    {

	        private final InputStream stream;
	        private final byte[] buf = new byte[8192];
	        private int curChar, snumChars;
	        private SpaceCharFilter filter;

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

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

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

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

	        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 String readString()
	        {
	                int c = snext();
	                while (isSpaceChar(c))
	                {
	                        c = snext();
	                }
	                StringBuilder res = new StringBuilder();
	                do
	                {
	                        res.appendCodePoint(c);
	                        c = snext();
	                } while (!isSpaceChar(c));
	                return res.toString();
	        }

	        public String nextLine()
	        {
	                int c = snext();
	                while (isSpaceChar(c))
	                        c = snext();
	                StringBuilder res = new StringBuilder();
	                do
	                {
	                        res.appendCodePoint(c);
	                        c = snext();
	                } while (!isEndOfLine(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;
	        }

	        private boolean isEndOfLine(int c)
	        {
	                return c == '\n' || c == '\r' || c == -1;
	        }

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

	    }
		
}

//For Pair sorting

//Arrays.sort(arr,new Comparator<Pair>() {
//		@Override public int compare(Pair p1, Pair p2) 
//{ 
//    return p1.x - p2.x; 
//} 
//});



//Pair arr[] = new Pair[n]; 
//arr[0] = new Pair(10, 20); 
class Pair { 
    int x; 
    int y; 
  
    // Constructor 
public Pair(int x, int y) 
    { 
        this.x = x; 
        this.y = y; 
    } 
} 
// class Compare { 
//	  //void return by default.
//     public  Pair[] compare(Pair arr[], int n) 
//    { 
//        // Comparator to sort the pair according to first element.
//        Arrays.sort(arr, new Comparator<Pair>() { 
//            @Override public int compare(Pair p1, Pair p2) 
//            { 
//                return p1.x - p2.x; 
//            } 
//        }); 
//        
//        
//        return arr;
//       /* for (int i = 0; i < n; i++) { 
//            System.out.print(arr[i].x + " " + arr[i].y + " "); 
//        } 
//        System.out.println(); */
//    } 
//} 
//



class couple implements Comparable<couple>
{ int x,y;
  public couple(int m,int f) {
 	 x=m;
 	 y=f;
  }
	public int compareTo(couple o) {
		
		 
		return x-o.x;
	}  
}
