#include <bits/stdc++.h>
#pragma GCC optimize(2)
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
const double PI = acos(-1.0);
const double eps = 1e-8;
using namespace std;
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int t, n, m, a[4444], dp[2222];
bool solve() {
  cin >> n;
  int mx = 0, l = 0;
  vector<int> vec;
  memset(dp, 0, sizeof(dp));
  dp[n] = -1;
  for (int i = 0; i < n * 2; ++i) {
    cin >> a[i];
    if (!i)
      mx = a[i];
    else {
      if (mx < a[i]) vec.push_back(i - l), l = i;
      mx = max(mx, a[i]);
    }
  }
  vec.push_back(n * 2 - l);
  for (int i = 0; i < vec.size(); ++i) {
    if (vec[i] == n) return 1;
    for (int j = n; j >= vec[i]; --j)
      if (dp[j] && dp[j] != i + 1 && dp[j - vec[i]] == 0)
        dp[j - vec[i]] = i + 1;
  }
  return dp[0];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> t;
  while (t--) cout << (solve() ? "YES" : "NO") << endl;
  return 0;
}
