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

/**
 * Write a description of class B_Problems here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
import java.util.*;

public class B_Problems
{
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        
        //Creating the Contest
        /*int n = s.nextInt();
        int problems = creatingTheContest(n, s);
        System.out.println(problems);    */
        
        //Timofey and Cubes
        /*int n = s.nextInt();
        long[] ar = new long[n];
        for (int i = 0; i < n; i++) {
            ar[i] = s.nextLong();
        }
        timofeyAndCubes(ar, n);*/
        //Conan and Agasa play a Card Game
        /*int n = s.nextInt();
        int[] ar = new int[n];
        for (int i = 0; i < n; i++) {
            ar[i] = s.nextInt();
        }
        Arrays.sort(ar);
        int count = 1;
        while(ar[0] == ar[count]) {
            count++;
        }
        if (count % 2 == 1) {
            System.out.println("Conan");
        }
        else {
            System.out.println("Agasa");
        }*/
        
        //Crosses and Paint
        /*int n = s.nextInt();
        for (int l = 0; l < n; l++) {
            int row = s.nextInt();
            int col = s.nextInt();
            boolean[][] ar = new boolean[row][col];
            s.nextLine();
            for (int i = 0; i < row; i++) {
                String str = s.nextLine();
                for (int j = 0; j < col; j++) {
                    ar[i][j] = true;
                    if (str.substring(j, j+1).equals(".")) {
                        ar[i][j] = false;
                    }
                }
            }
            System.out.println(crossesAndPaint(row, col, ar));
        }*/
        
        //Equal Rectangles
        int n = s.nextInt();
        for (int i = 0; i < n; i++) {
            int rectangles = s.nextInt();
            int[] ar = new int[rectangles * 4];
            for (int j = 0; j < rectangles*4; j++) {
                ar[j] = s.nextInt();
            }
            Arrays.sort(ar);
            System.out.println(equalRectangles(ar, rectangles));
        }
        
        s.close();
    }
    
    public static int creatingTheContest(int n, Scanner s) {
        int max = 1;
        int index = 1;
        int[] ar = new int[n];
        ar[0] = s.nextInt();
        for (int i = 1; i < n; i++) {
            ar[i] = s.nextInt();
            if (ar[i-1] *2 < ar[i]) {
                if (index > max) {
                    max = index;
                }
                index = 0;
            }
            
            index++;
        }
        
        if (index > max) {
            max = index;
        }
        
        return max;
    }
    
    public static void timofeyAndCubes(long[] ar, int n) {
        long[] ans = new long[n];
        if (n % 2 == 1) {
            for (int i = 0; i < (n-1)/2; i++) {
                if (i % 2 == 0) {
                    ans[i] = ar[n-i-1];
                    ans[n-i-1] = ar[i];
                }
                else {
                    ans[i] = ar[i];
                    ans[n-i-1] = ar[n-i-1];
                }
            }
            ans[(n - 1) / 2] = ar[(n - 1) / 2];
        }
        else {
            for (int i = 0; i < n/2; i++) {
                if (i % 2 == 0) {
                    ans[i] = ar[n-i-1];
                    ans[n-i-1] = ar[i];
                }
                else {
                    ans[i] = ar[i];
                    ans[n-i-1] = ar[n-i-1];
                }
            }
        }
        StringBuffer sBuffer = new StringBuffer();
        for (int i = 0; i < n; i++) {
            sBuffer.append(ans[i] + " ");
        }
        System.out.println(sBuffer);
    }
    
    public static int crossesAndPaint(int row, int col, boolean[][] ar) {
        int best = row+col-1;
        int[] colCount = new int[col];
        int[] rowCount = new int[row];
        
        for (int i = 0; i < col; i++) {
            int count = 0;
            for (int j = 0; j < row; j++) {
                if (ar[j][i]) {
                    count++;
                }
            }
            colCount[i] = count;
        }
        
        for (int i = 0; i < row; i++) {
            int count = 0;
            for (int j = 0; j < col; j++) {
                if (ar[i][j]) {
                    count++;
                }
            }
            rowCount[i] = count;
        }
        
        for (int i = 0; i < row; i++) {
            for (int j = 0; j < col; j++) {
                if (ar[i][j]) {
                    int num = (row+col-1) - (colCount[j] + rowCount[i] - 1);
                    if (best > num) {
                        best = num;
                    }
                }
                else {
                    int num = (row+col-1) - (colCount[j] + rowCount[i]);
                    if (best > num) {
                        best = num;
                    }
                }
            }
        }
        
        
        return best;
    }
    
    public static String equalRectangles(int[] ar, int rec) {
        int difNumbers = 1;
        int count = 1;
        int Ncount = 0;
        int checkerCount;
        while (count < ar.length) {
            if (ar[count] != ar[count-1]) {
                difNumbers++;
            }
            count++;
        }
        int[][] ar2 = new int[difNumbers][2];
        for (int i = 0; i < ar.length-1; i++) {
            count = 1;
            checkerCount = i;
            while (ar[checkerCount] == ar[checkerCount+1]) {
                count++;
                if (checkerCount == ar.length-2) {
                    break;
                }
                else {
                    checkerCount++;
                }
            }
            if (count % 2 == 1) {
                return "NO";
            }
            ar2[Ncount][0] = ar[i];
            ar2[Ncount][1] = count;
            Ncount++;
            i += (count - 1);
        }
        int area = ar2[0][0] * ar2[difNumbers-1][0];
        for (int i = 0; i < difNumbers; i++) {
            if (ar2[i][1] != ar2[difNumbers-i-1][1]) {
                return "NO";
            }
            if (area != ar2[i][0] * ar2[difNumbers-i-1][0]) {
                return "NO";
            }
        }
        
        
        return "YES";
    }
}
