#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, ar;
    cin >> n;
    int a[4 * n];
    map<int, int> m;
    for (int i = 0; i < 4 * n; i++) {
      cin >> a[i];
      m[a[i]]++;
    }
    sort(a, a + 4 * n);
    ar = a[0] * a[4 * n - 1];
    bool flag = true;
    for (auto i = m.begin(); i != m.end(); i++) {
      if (i->second % 2 == 1) {
        flag = false;
        break;
      }
    }
    if (flag == false) {
      cout << "No" << endl;
      continue;
    } else {
      flag = true;
      int i = 1, j = 4 * n - 2;
      while (i < j) {
        if (a[i] * a[j] != ar) {
          flag = false;
          break;
        }
        i++;
        j--;
      }
      if (flag == false)
        cout << "No" << endl;
      else
        cout << "Yes" << endl;
    }
  }
}
