#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long maxn = 5e3;
const long long mod = 1e9 + 7;
const long double PI = acos((long double)-1);
long long pw(long long a, long long b, long long md = mod) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (a * res) % md;
    }
    a = (a * a) % md;
    b >>= 1;
  }
  return (res);
}
int q, n;
int p[maxn];
bitset<maxn> bit, amoo;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> q;
  while (q--) {
    cin >> n;
    for (int i = 0; i < 2 * n; i++) {
      cin >> p[i];
    }
    vector<int> vec;
    vec.clear();
    int cur = 0, cnt = 0;
    for (int i = 0; i < n + n; i++) {
      if (p[i] > p[cur]) {
        cur = i;
        vec.push_back(cnt);
        cnt = 0;
      }
      cnt++;
    }
    vec.push_back(cnt);
    sort(vec.begin(), vec.end());
    bit = 0;
    bit[0] = 1;
    for (int i : vec) {
      amoo = bit << i;
      bit |= amoo;
    }
    if (bit[n]) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
  return (0);
}
