#include <bits/stdc++.h>
using namespace std;
template <typename... T>
void read(T &...args) {
  ((cin >> args), ...);
}
template <typename... T>
void write(T &&...args) {
  ((cout << args << " "), ...);
}
template <typename... T>
void writen(T &&...args) {
  ((cout << args << "\n"), ...);
}
template <typename... T>
void cn(T &&...args) {
  ((cout << args << " "), ...);
  cout << "\n";
}
void deb(unsigned x) { cout << x; }
void deb(unsigned long x) { cout << x; }
void deb(unsigned long long x) { cout << x; }
void deb(float x) { cout << x; }
void deb(double x) { cout << x; }
void deb(long double x) { cout << x; }
void deb(char x) { cout << '\'' << x << '\''; }
void deb(const char *x) { cout << '\"' << x << '\"'; }
void deb(const string &x) { cout << '\"' << x << '\"'; }
void deb(bool x) { cout << (x ? "true" : "false"); }
template <typename T, typename V>
void deb(const pair<T, V> &x) {
  cout << '{';
  deb(x.first);
  cout << ',';
  deb(x.second);
  cout << '}';
}
template <typename T>
void deb(const T &x) {
  int f = 0;
  cout << '{';
  for (auto &i : x) cout << (f++ ? "," : ""), deb(i);
  cout << "}";
}
void deb1() { cout << "]\n"; }
template <typename T, typename... V>
void deb1(T t, V... v) {
  deb(t);
  if (sizeof...(v)) cout << ", ";
  deb1(v...);
}
long long bin(long long a, long long b, long long mod) {
  if (b == 0) return 1;
  if (b % 2 == 0) return bin((a * a) % mod, b / 2, mod) % mod;
  return ((a % mod) * (bin((a * a) % mod, b / 2, mod) % mod)) % mod;
}
int siz;
int dp[4005][4005];
void solve() {
  int n;
  read(n);
  int ar[2 * n];
  vector<int> val;
  set<int> s;
  map<int, int> pos;
  for (int i = 0; i < 2 * n; i++) {
    read(ar[i]);
    s.insert(ar[i]);
    pos[ar[i]] = i;
  }
  int lp = 2 * n;
  while (!s.empty()) {
    auto it = s.end();
    it--;
    int a = (*it);
    for (int i = pos[a]; i < lp; i++) {
      s.erase(ar[i]);
    }
    val.push_back(lp - pos[a]);
    lp = pos[a];
  }
  siz = (int)(val.size());
  for (int i = 0; i < 4005; i++) {
    dp[i][i] = 0;
  }
  for (int i = 1; i < siz + 1; i++) {
    for (int j = 0; j < n + 1; j++) {
      if (j - val[i - 1] >= 0) {
        dp[i][j] = max(val[i - 1] + dp[i - 1][j - val[i - 1]], dp[i - 1][j]);
      } else {
        dp[i][j] = dp[i - 1][j];
      }
    }
  }
  if (dp[siz][n] == n) {
    cn("YES");
  } else {
    cn("NO");
  }
  val.clear();
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
