#include <bits/stdc++.h>
using namespace std;
const int N = 4000 + 5;
const int INF = 0x3f3f3f3f;
const long long INF_LL = 0x3f3f3f3f3f3f3f3f;
int f[N][N], g[N][N];
int pre[N];
int a[N];
int Solve() {
  int n;
  cin >> n;
  n *= 2;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i <= n / 2; i++)
    for (int j = 0; j <= n / 2; j++) f[i][j] = g[i][j] = 0;
  a[n + 1] = INF;
  for (int i = n + 1; i >= 1; i--) {
    pre[i] = i;
    for (int j = i; j >= 1; j--) {
      if (a[j] <= a[i]) {
        pre[i] = j;
      } else
        break;
    }
    pre[i] = i - pre[i];
  }
  f[0][0] = g[0][0] = 1;
  for (int i = 0; i <= n / 2; i++) {
    for (int j = 0; j <= n / 2; j++) {
      if (i > 0) f[i][j] += f[i - 1][j];
      if (j > 0) g[i][j] += g[i][j - 1];
      if (f[i][j]) {
        g[i][j + 1]++;
        g[i][j + pre[n - i - j + 1] + 1]--;
      }
      if (g[i][j]) {
        f[i + 1][j]++;
        f[i + pre[n - i - j + 1] + 1][j]--;
      }
    }
  }
  return f[n / 2][n / 2];
}
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) cout << (Solve() ? "YES" : "NO") << endl;
  return 0;
}
