#include <bits/stdc++.h>
using namespace std;
int t, n, x[4005];
set<int> s;
bool dp[4005];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    for (int i = 0; i < n * 2; i++) {
      scanf("%d", x + i);
      s.insert(i + 1);
    }
    memset(dp, 0, n * 2 + 1);
    dp[0] = 1;
    for (int i = n * 2 - 1, cnt = 0, hv = 0; i >= 0; i--) {
      cnt++;
      if (x[i] == *s.rbegin()) {
        for (int j = hv; j >= 0; j--)
          if (dp[j]) dp[j + cnt] = 1;
        hv += cnt;
        cnt = 0;
      }
      s.erase(x[i]);
    }
    puts(dp[n] ? "YES" : "NO");
  }
}
