#include <bits/stdc++.h>
using namespace std;
int T, n, p[4005], buf[4005], bn;
bitset<4005> b;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    bn = 0;
    for (int i = 1; i <= n * 2; i++) scanf("%d", &p[i]);
    for (int i = 1, j; i <= n * 2; i = j) {
      j = i + 1;
      while (j <= n * 2 && p[j] < p[i]) j++;
      buf[++bn] = j - i;
    }
    b.reset();
    b[0] = true;
    for (int i = 1; i <= bn; i++) b |= b << buf[i];
    puts(b[n] ? "YES" : "NO");
  }
  return 0;
}
