#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
constexpr int inf = 1000000010;
constexpr long long INF = 1000000000000000010;
constexpr long double eps = 1e-12;
constexpr long double pi = 3.141592653589793238;
template <class T, class U>
inline bool chmax(T &a, const U &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T, class U>
inline bool chmin(T &a, const U &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(2 * n);
    for (long long i = 0; i < (2 * n); i++) cin >> a[i];
    int tmp = 0;
    vector<int> pl;
    for (long long i = 0; i < (2 * n); i++)
      if (chmax(tmp, a[i])) pl.push_back(i);
    pl.push_back(2 * n);
    int sz = pl.size();
    sz--;
    vector<int> use(sz);
    for (long long i = 0; i < (sz); i++) use[i] = pl[i + 1] - pl[i];
    bitset<2010> dp;
    dp[0] = 1;
    for (long long i = 0; i < (sz); i++) dp = dp | (dp << use[i]);
    if (dp[n])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
