#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int max_n = 2000 + 10, inf = 1000111222;
bitset<2 * max_n> dp[2][2 * max_n];
bitset<2 * max_n> dp_block[2][2 * max_n];
const int B_size = 45;
int a[2 * max_n];
const bool debug = 0;
int max_on_seg[2 * max_n][2 * max_n];
void solve() {
  int n;
  if (debug) {
    n = 2000;
    for (int i = 0; i < 2 * n; i++) {
      a[i] = i;
    }
    random_shuffle(a, a + 2 * n);
  } else {
    cin >> n;
    for (int i = 0; i < 2 * n; i++) {
      cin >> a[i];
    }
  }
  a[2 * n] = inf;
  for (int i = 0; i < 2 * n; i++) {
    max_on_seg[i][i] = a[i];
    for (int j = i + 1; j < 2 * n; j++) {
      max_on_seg[i][j] = max(max_on_seg[i][j - 1], a[j]);
    }
  }
  for (int i = 0; i <= 2 * n; i++) {
    dp[0][i].reset();
    dp[1][i].reset();
    dp_block[0][i].reset();
    dp_block[1][i].reset();
  }
  dp[0][0][max_n + 0] = 1;
  auto build_block = [&](int block_id) {
    for (int i = 0; i < B_size; i++) {
      dp_block[0][block_id * B_size] |=
          (dp[0][block_id * B_size + i] << (B_size - i - 1));
      dp_block[1][block_id * B_size] |=
          (dp[1][block_id * B_size + i] >> (B_size - i - 1));
    }
  };
  auto get_dp_or = [&](int type, int l, int r) {
    int R = r;
    if (type == 0) {
      if (r - l + 1 <= 2 * B_size) {
        bitset<2 * max_n> res;
        for (int i = l; i <= r; i++) {
          res |= (dp[type][i] << (R - i));
        }
        return res;
      } else {
        bitset<2 * max_n> res;
        while (l % B_size != 0) {
          res |= (dp[type][l] << (R - l));
          l++;
        }
        while ((r + 1) % B_size != 0) {
          res |= (dp[type][r] << (R - r));
          r--;
        }
        while (l <= r) {
          res |= (dp_block[type][l] << (R - l - (B_size - 1)));
          l += B_size;
        }
        return res;
      }
    } else {
      if (r - l + 1 <= 2 * B_size) {
        bitset<2 * max_n> res;
        for (int i = l; i <= r; i++) {
          res |= (dp[type][i] >> (R - i));
        }
        return res;
      } else {
        bitset<2 * max_n> res;
        while (l % B_size != 0) {
          res |= (dp[type][l] >> (R - l));
          l++;
        }
        while ((r + 1) % B_size != 0) {
          res |= (dp[type][r] >> (R - r));
          r--;
        }
        while (l <= r) {
          res |= (dp_block[type][l] >> (R - l - (B_size - 1)));
          l += B_size;
        }
        return res;
      }
    }
  };
  for (int i = 0; i < 2 * n; i++) {
    if (i % B_size == B_size - 1) {
      build_block(i / B_size);
    }
    for (int j = 0; j <= i; j++) {
      if (max_on_seg[j][i] < a[i + 1]) {
        int l = i - j + 1;
        int L = j;
        int R = i;
        dp[1][i + 1] |= (get_dp_or(0, L, R) << 1);
        dp[0][i + 1] |= (get_dp_or(1, L, R) >> 1);
        break;
      }
    }
  }
  cout << (dp[0][2 * n][max_n + 0] || dp[1][2 * n][max_n + 0] ? "YES" : "NO")
       << "\n";
}
int main() {
  int test;
  cin >> test;
  while (test--) {
    solve();
  }
}
