#include <bits/stdc++.h>
using namespace std;
void init_code() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const long long N = 3e5;
int a[N];
int ma[N];
int dp[4001][4001][2];
int n;
int make(int i, int j, int k) {
  if (i == 2 * n) {
    if (j == n) return 1;
    return 0;
  }
  if (dp[i][j][k] == -1) {
    if (k == 0) {
      if (ma[i] == a[i]) {
        dp[i][j][k] = (make(i + 1, j, 1) | make(i + 1, j + 1, 0));
      } else
        dp[i][j][k] = make(i + 1, j + 1, 0);
    } else {
      if (ma[i] == a[i]) {
        dp[i][j][k] = (make(i + 1, j, 1) | make(i + 1, j + 1, 0));
      } else
        dp[i][j][k] = make(i + 1, j, 1);
    }
  }
  return dp[i][j][k];
}
int main() {
  init_code();
  long long t;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < 2 * n; i++) {
      cin >> a[i];
      if (i == 0)
        ma[i] = a[i];
      else
        ma[i] = max(ma[i - 1], a[i]);
    }
    for (int i = 0; i < 2 * n; i++) {
      for (int j = 0; j < 2 * n; j++) {
        for (int k = 0; k < 2; k++) dp[i][j][k] = -1;
      }
    }
    if (make(0, 0, 0))
      cout << "YES";
    else
      cout << "NO";
    cout << "\n";
  }
}
