#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long LL_INF = LLONG_MAX;
void print_vector(vector<int>& v) {
  for (int i : v) cout << i << " ";
  cout << '\n';
}
void print_array(int a[], int s, int e) {
  for (int i = s; i < e; ++i) cout << a[i] << " ";
  cout << '\n';
}
int lc(int n) { return n << 1; }
int rc(int n) { return (n << 1) + 1; }
int avg(int a, int b) { return (a + b) / 2; }
const int MAXN = 4005;
int DP[MAXN][MAXN][2];
int P[MAXN];
int n;
bool solve(int i, int maxval, int l, int r, int prev) {
  if (l < 0 || r < 0) return 0;
  if (l > n || r > n) return 0;
  if (DP[l][r][prev] != -1) return DP[l][r][prev];
  if (P[i] > maxval) {
    maxval = P[i];
    return DP[l][r][prev] = solve(i + 1, maxval, l - 1, r, 0) ||
                            solve(i + 1, maxval, l, r - 1, 1);
  } else {
    if (prev)
      return DP[l][r][prev] = solve(i + 1, maxval, l, r - 1, 1);
    else
      return DP[l][r][prev] = solve(i + 1, maxval, l - 1, r, 0);
  }
  return DP[l][r];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    for (int i = 1; i < 2 * n + 1; ++i) cin >> P[i];
    for (int i = 0; i < n + 1; ++i) {
      for (int j = 0; j < n + 1; ++j) DP[i][j][0] = DP[i][j][1] = -1;
    }
    DP[0][0][0] = 1;
    DP[0][0][1] = 1;
    if (solve(1, 0, n, n, 0))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
