#include <bits/stdc++.h>
using namespace std;
template <typename T>
string to_string(const vector<T>& vc, int w) {
  if (vc.empty()) return "";
  if (w + 1 == vc.size()) return to_string(vc[w]);
  return to_string(vc[w]) + "," + to_string(vc, w + 1);
}
template <typename T>
string to_string(const vector<T>& vc) {
  return "{" + to_string(vc, 0) + "}";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
class DebugStream {
} LOG;
template <typename T>
DebugStream& operator<<(DebugStream& s, const T&) {
  return s;
}
const int MAX = 4040;
int p[MAX];
int szs[MAX];
int s;
bool dp[MAX][MAX];
bool visited[MAX][MAX];
bool solve(int cObj, int pos) {
  if (!visited[cObj][pos]) {
    visited[cObj][pos] = true;
    if (cObj == 0) {
      if (pos == 0)
        dp[cObj][pos] = true;
      else
        dp[cObj][pos] = false;
    } else {
      dp[cObj][pos] = solve(cObj - 1, pos);
      if (pos >= szs[cObj - 1]) {
        dp[cObj][pos] = (dp[cObj][pos] || solve(cObj - 1, pos - szs[cObj - 1]));
      }
    }
  }
  return dp[cObj][pos];
}
int main() {
  int T;
  scanf("%d", &T);
  for (int t = 0; t < int(T); t++) {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < int(2 * n); i++) scanf("%d", p + i);
    int i = 0;
    s = 0;
    while (i < 2 * n) {
      int j = i;
      while (j + 1 < 2 * n && p[j + 1] < p[i]) j++;
      szs[s++] = j - i + 1;
      i = j + 1;
    }
    for (int i = 0; i < int(s + 1); i++)
      for (int j = 0; j < int(n + 1); j++) visited[i][j] = false;
    if (solve(s, n))
      printf("YES\n");
    else
      printf("NO\n");
  }
}
