#include <bits/stdc++.h>
using namespace std;
const long long N = 2005;
long long dp[2 * N][N];
vector<long long> blocks;
long long solveDp(long long idx, long long rem) {
  if (rem == 0 && idx >= 0) return 1;
  if (rem < 0 || idx < 0) return 0;
  if (dp[idx][rem] != -1) return dp[idx][rem];
  long long x = solveDp(idx - 1, rem - blocks[idx]);
  long long y = solveDp(idx - 1, rem);
  dp[idx][rem] = max(x, y);
  return dp[idx][rem];
}
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[2 * n + 1];
    set<long long> st;
    for (long long i = 1; i <= 2 * n; i++) cin >> a[i], st.insert(i);
    blocks.clear();
    long long cur = 2 * n;
    while (cur > 0) {
      long long size = 0;
      long long val = *(st.rbegin());
      while (a[cur] != val) size++, st.erase(a[cur]), cur--;
      size++, cur--;
      st.erase(val);
      blocks.push_back(size);
    }
    for (long long i = 0; i <= blocks.size(); i++)
      for (long long j = 1; j <= n; j++) dp[i][j] = -1;
    if (solveDp(blocks.size() - 1, n))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
signed main() { solve(); }
