#include <bits/stdc++.h>
using namespace std;
inline int rd(int f = 1, int x = 0, char ch = ' ') {
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
const int N = 4e3 + 5;
int n, p[N], v[N], f[N], m, ans;
int main() {
  for (int T = rd(); T--;) {
    n = rd() << 1, f[0] = 1, ans = 0, m = 0, memset(f + 1, 0, sizeof(int) * n);
    for (int i = 1; i <= n; ++i) p[i] = max(rd(), p[i - 1]);
    for (int i = 2, j = 1; i <= n; ++i)
      if (p[i] != p[i - 1])
        v[++m] = j, j = 1;
      else
        ++j;
    for (int i = 1; i <= m; ++i)
      for (int j = n / 2; j >= v[i]; --j) f[j] |= f[j - v[i]];
    puts(f[n / 2] ? "YES" : "NO");
  }
  return 0;
}
