#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    scanf("%d", &n);
    int m = 2 * n;
    vector<int> a(m);
    for (int& x : a) scanf("%d", &x), --x;
    stack<int> stk;
    vector<int> NG(m, m);
    for (int i = 0; i < m; i++) {
      while (!stk.empty() && a[stk.top()] < a[i]) NG[stk.top()] = i, stk.pop();
      stk.push(i);
    }
    vector<vector<bool>> Dp(m + 1, vector<bool>(m + 1));
    Dp[m][n] = true;
    for (int i = m - 1; ~i; --i) {
      for (int j = n; ~j; --j) {
        int k = NG[i];
        int x = NG[i] - i;
        Dp[i][j] = Dp[i][j] || Dp[k][j];
        if (j + x <= n) Dp[i][j] = Dp[i][j] || Dp[k][j + x];
      }
    }
    puts(Dp[0][0] ? "YES" : "NO");
  }
}
