#include <bits/stdc++.h>
using namespace std;
const long long maxn = 4010;
const long long mod = 1e9 + 7;
const long long inf = 1e9 + 10;
const long long N = 2e7 + 10;
long long n, m, k, q;
long long p[2 * maxn];
pair<long long, long long> mx[maxn];
bool is[maxn][maxn];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> q;
  while (q--) {
    cin >> n;
    for (long long i = 1; i <= 2 * n; i++) {
      cin >> p[i];
      if (p[i] > mx[i - 1].first)
        mx[i] = {p[i], i};
      else
        mx[i] = mx[i - 1];
    }
    for (long long a = 0; a <= n; a++)
      for (long long b = 0; b <= n; b++) {
        if (a == 0 && b == 0) {
          is[a][b] = 1;
          continue;
        }
        is[a][b] = 0;
        long long i = a + b;
        long long pos = mx[i].second;
        if ((i - pos + 1) <= a) (is[a][b] |= is[a - (i - pos + 1)][b]);
        if ((i - pos + 1) <= b) (is[a][b] |= is[a][b - (i - pos + 1)]);
      }
    if (is[n][n])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
