#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const int SIZE = 2e5 + 5;
const long long INF = 1LL << 60;
const double eps = 1e-4;
const double PI = 3.1415926535897932;
int n;
int p[4009];
int dp[2009];
int main() {
  int ___T, case_n = 1;
  scanf("%d ", &___T);
  while (___T-- > 0) {
    scanf("%d", &(n));
    set<int> st;
    for (int i = 0; i < (2 * n); ++i) {
      scanf("%d", &(p[i]));
      st.insert(i + 1);
    }
    vector<int> px;
    int last = 2 * n;
    for (int i = 2 * n - 1; i >= 0; i--) {
      if (p[i] == *st.rbegin()) {
        px.push_back(last - i);
        for (int j = (i); j < (last); ++j) st.erase(p[j]);
        last = i;
      }
    }
    if (last != 0) {
      px.push_back(last);
    }
    memset((dp), 0, sizeof((dp)));
    dp[0] = 1;
    for (int i = 0; i < (((int)(px).size())); ++i) {
      for (int j = n; j >= px[i]; j--) {
        dp[j] |= dp[j - px[i]];
      }
    }
    if (dp[n])
      puts("YES");
    else
      puts("NO");
  }
}
