#include <bits/stdc++.h>
const int maxn = 4000 + 9, mod = 998244353, inf = 0x3f3f3f3f;
int Read() {
  int x(0), f(1);
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3ll) + (x << 1ll) + c - '0';
    c = getchar();
  }
  return x * f;
}
void Chkmin(int &x, int y) {
  if (y < x) x = y;
}
void Chkmax(int &x, int y) {
  if (y > x) x = y;
}
int add(int x, int y) { return x += y, x >= mod ? x - mod : x; }
int dec(int x, int y) { return x -= y, x < 0 ? x + mod : x; }
int mul(int x, int y) { return 1ll * x * y % mod; }
int T;
int a[maxn], f[maxn][maxn][2], lst1[maxn][2], l[maxn], lst2[maxn][2];
int main() {
  T = Read();
  while (T--) {
    int n = Read();
    for (int i = 1; i <= 2 * n; ++i) a[i] = Read();
    for (int i = 1; i <= 2 * n; ++i) {
      l[i] = 0;
      for (int j = i - 1; j >= 1; --j) {
        if (a[j] > a[i]) {
          l[i] = j + 1;
          break;
        }
      }
      if (!l[i]) l[i] = 1;
    }
    for (int i = 1; i <= n + 1; ++i) {
      if (l[i] == 1) {
        f[i - 1][0][1] = 1;
        f[0][i - 1][0] = 1;
        lst1[i - 1][1] = i;
        lst1[i - 1][0] = i;
      }
    }
    for (int len = 3; len <= 2 * n; ++len) {
      for (int i = 0; i <= n; ++i) {
        int j(len - 1 - i);
        if (j < 0) break;
        if (j > n) continue;
        f[i][j][0] = (lst1[i][1] >= l[i + j + 1]);
        if (f[i][j][0]) Chkmax(lst2[j][0], i + j + 1);
        f[i][j][1] = (lst1[j][0] >= l[i + j + 1]);
        if (f[i][j][1]) Chkmax(lst2[i][1], i + j + 1);
      }
      for (int i = 0; i <= n; ++i)
        Chkmax(lst1[i][0], lst2[i][0]), Chkmax(lst1[i][1], lst2[i][1]);
    }
    int ans(0);
    for (int i = 1; i <= n; ++i) {
      ans |= (f[n][n - i][1] | f[n - i][n][0]);
    }
    if (ans) {
      puts("YES");
    } else
      puts("NO");
    for (int i = 0; i <= 2 * n; ++i) {
      for (int j = 0; j <= 2 * n; ++j) {
        f[i][j][0] = f[i][j][1] = 0;
      }
      lst1[i][0] = lst1[i][1] = lst2[i][0] = lst2[i][1] = 0;
    }
  }
  return 0;
}
