#include <bits/stdc++.h>
using namespace std;
int q;
int main() {
  cin >> q;
  for (int qc = 1; qc <= q; qc++) {
    int n, a[10005], mx = -1, mn = 10005;
    bool ok = true;
    for (int i = 1; i <= 10005; i++) {
      a[i] = 0;
    }
    cin >> n;
    for (int i = 1; i <= 4 * n; i++) {
      int x;
      cin >> x;
      a[x]++;
      if (x > mx) mx = x;
      if (x < mn) mn = x;
    }
    int l = mn, r = mx, nmbs = 0;
    bool lDest = true, rDest = true;
    int area = mn * mx;
    while (nmbs < 4 * n) {
      if (lDest && rDest) {
        nmbs += a[l] + a[r];
        if (l * r != area || a[l] != a[r] || a[l] % 2 == 1) {
          ok = false;
          break;
        }
        lDest = false;
        rDest = false;
      }
      if (!lDest) {
        l++;
        if (a[l] > 0) lDest = true;
      }
      if (!rDest) {
        r--;
        if (a[r] > 0) rDest = true;
      }
    }
    if (ok)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
