#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e9;
const long long inf = (long long)2e18;
const long double eps = (long double)1e-8;
const long long mod = (long long)111111111111111111;
const long long MAXN = (long long)4e3 + 10;
const long long MAXC = (long long)1e6 + 1;
const long long MAXE = (long long)1000;
const long long MAXLOG = (long long)18;
const long long maxlen = (long long)1e5;
const long long asci = (long long)256;
const long long block = 480;
const long double PI = acos(-1);
const long double e = 2.7182818284;
template <class T>
istream &operator>>(istream &in, vector<T> &arr) {
  for (T &cnt : arr) {
    in >> cnt;
  }
  return in;
};
int dp[MAXN][MAXN][2];
void solve() {
  int n;
  cin >> n;
  n <<= 1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      dp[i][j][0] = 0, dp[i][j][1] = 0;
    }
  }
  dp[1][0][0] = 1;
  vector<long long> a(n);
  cin >> a;
  stack<int> q;
  vector<long long> ans(n, n);
  for (int i = 0; i < n; ++i) {
    while (q.size() && a[q.top()] < a[i]) {
      ans[q.top()] = i;
      q.pop();
    }
    q.push(i);
  }
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      if (i + j >= n || i + j == 0) continue;
      int nex = ans[i + j - 1];
      int delta = nex - i - j + 1;
      if (nex == n) {
        delta--;
        dp[i][j + delta][1] |= dp[i][j][1];
        dp[i + delta][j][0] |= dp[i][j][0];
        continue;
      }
      dp[i + 1][j + delta - 1][0] |= dp[i][j][1];
      dp[i + delta - 1][j + 1][1] |= dp[i][j][0];
      dp[i][j + delta][1] |= dp[i][j][1];
      dp[i + delta][j][0] |= dp[i][j][0];
    }
  }
  if (dp[n / 2][n / 2][1] | dp[n / 2][n / 2][0])
    cout << "YES\n";
  else
    cout << "NO\n";
}
signed main() {
  srand(time(0));
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.precision(30);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
