#include <bits/stdc++.h>
using namespace std;
const int N = (int)4e3 + 11;
int n, a[N];
pair<int, int> t[4 * N];
void build(int v, int l, int r) {
  if (l == r)
    t[v].first = a[l], t[v].second = l;
  else {
    int mid = (l + r) / 2;
    build(v + v, l, mid);
    build(v + v + 1, mid + 1, r);
    t[v] = max(t[v + v], t[v + v + 1]);
  }
}
pair<int, int> get(int v, int l, int r, int lx, int rx) {
  if (r < lx or rx < l) return make_pair(0, -1);
  if (lx <= l and r <= rx) return t[v];
  int mid = (l + r) / 2;
  return max(get(v + v, l, mid, lx, rx), get(v + v + 1, mid + 1, r, lx, rx));
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n + n; i++) cin >> a[i];
  int cnta = 0, cntb = 0;
  build(1, 1, n + n);
  int r = n + n;
  vector<int> q;
  while (1) {
    if (r < 1) break;
    pair<int, int> pr = get(1, 1, n + n, 1, r);
    q.push_back(r - pr.second + 1);
    r = pr.second - 1;
  }
  sort(q.begin(), q.end());
  bool u[N];
  memset(u, 0, sizeof(u));
  u[0] = 1;
  for (int i = 0; i < q.size(); i++)
    for (int j = n; j >= q[i]; j--)
      if (u[j - q[i]]) u[j] = 1;
  if (u[n])
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  ;
  int tt = 1;
  cin >> tt;
  for (int i = 1; i <= tt; i++) {
    solve();
  }
  return 0;
}
