#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
void read(int& val) {
  int x = 0;
  int bz = 1;
  char c;
  for (c = getchar(); (c < '0' || c > '9') && c != '-'; c = getchar())
    ;
  if (c == '-') {
    bz = -1;
    c = getchar();
  }
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - 48;
  val = x * bz;
}
const int mod = 1e9 + 7;
const int maxn = 1e6 + 10;
int dp[4100][4100];
int n;
int a[maxn], b[maxn], f[maxn], sz[maxn];
int find(int x) { return x == f[x] ? x : f[x] = find(f[x]); }
void merge(int x, int y) {
  int fx = find(x), fy = find(y);
  sz[fy] += sz[fx];
  f[fx] = fy;
}
int main() {
  int t;
  read(t);
  while (t--) {
    read(n);
    for (int i = 1; i <= n + n; i++) read(a[i]), f[i] = i, sz[i] = 1;
    stack<int> s;
    for (int i = n + n; i >= 1; i--) {
      if (s.empty()) {
        s.push(a[i]);
      } else {
        if (s.top() < a[i]) {
          while (!s.empty() && s.top() < a[i]) {
            merge(s.top(), a[i]);
            s.pop();
          }
          s.push(a[i]);
        } else {
          s.push(a[i]);
        }
      }
    }
    int tot = 0;
    while (!s.empty()) {
      b[++tot] = sz[find(s.top())];
      s.pop();
    }
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++) dp[i][j] = 0;
    dp[0][0] = 1;
    int sum = 0;
    for (int i = 1; i <= tot; i++) {
      for (int j = 0; j <= n; j++) {
        int r = sum - j;
        if (dp[j][r]) {
          dp[j + b[i]][r] = dp[j][r + b[i]] = 1;
        }
      }
      sum += b[i];
    }
    if (dp[n][n])
      puts("YES");
    else
      puts("NO");
  }
}
