#include <bits/stdc++.h>
using namespace std;
template <typename T>
void rd(T& x) {
  long long f = 0, c;
  while (!isdigit(c = getchar())) f ^= !(c ^ 45);
  x = (c & 15);
  while (isdigit(c = getchar())) x = x * 10 + (c & 15);
  if (f) x = -x;
}
template <typename T>
void pt(T x, long long c = -1) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) pt(x / 10);
  putchar(x % 10 + 48);
  if (c != -1) putchar(c);
}
const long long N = 4005;
long long T, n, p[N], len, q[N], f[N];
signed main() {
  rd(T);
  while (T--) {
    rd(n);
    for (long long i = (1); i <= (n * 2); ++i) rd(p[i]);
    len = 0;
    for (long long i = 1, j; i <= n * 2; i = j) {
      j = i + 1;
      while (j <= n * 2 && p[j] < p[i]) ++j;
      q[++len] = j - i;
    }
    for (long long i = (0); i <= (n * 2); ++i) f[i] = 0;
    f[0] = 1;
    for (long long i = (1); i <= (len); ++i) {
      for (long long j = (N - 1); j >= (q[i]); --j) f[j] |= f[j - q[i]];
    }
    puts(f[n] ? "YES" : "NO");
  }
  return 0;
}
