#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmin(T &a, const T &val) {
  if (a > val) a = val;
}
template <class T>
inline void chmax(T &a, const T &val) {
  if (a < val) a = val;
}
template <class T>
long long sqr(T a) {
  return 1ll * a * a;
}
template <class T>
void compress(T &a) {
  sort(a.begin(), a.end());
  a.resize(unique(a.begin(), a.end()) - a.begin());
}
const double pi = acos(-1.00);
const double eps = 1e-6;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {-1, 1, 0, 0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    n *= 2;
    vector<int> pos(n + 1), p(n + 1);
    for (int i = 1; i <= n; i++) {
      cin >> p[i];
      pos[p[i]] = i;
    }
    vector<int> memo;
    int cur = n;
    int pre = n;
    for (int i = n; i > 0; i--) {
      if (p[i] == cur) {
        memo.push_back(pre - i + 1);
        pre = i - 1;
        do {
          cur--;
        } while (cur && pos[cur] >= i);
      }
    }
    n /= 2;
    vector<bool> dp(n + 1, false);
    dp[0] = true;
    for (int x : memo) {
      for (int i = n; i >= x; i--) {
        dp[i] = dp[i] || dp[i - x];
      }
    }
    cout << (dp[n] ? "YES" : "NO") << '\n';
  }
  return 0;
}
