#include <bits/stdc++.h>
int t, n, max;
std::vector<int> a;
bool isPermutation(const std::vector<int>& inp) {
  std::vector<int> incp = inp;
  std::sort(incp.begin(), incp.end(), std::greater<int>());
  int last = 0;
  while (!incp.empty() && last + 1 == incp.back()) {
    incp.pop_back();
    last++;
  }
  return incp.empty();
}
int main() {
  std::cin >> t;
  for (int i = 0; i < t; i++) {
    a.clear();
    max = 0;
    std::cin >> n;
    for (int j = 0; j < n; j++) {
      int t;
      std::cin >> t;
      a.push_back(t);
      if (t > max) {
        max = t;
      }
    }
    int count = 0;
    std::vector<std::pair<int, int> > divs;
    std::vector<int> lh, rh;
    for (int j = 0; j < max; j++) {
      lh.push_back(a[j]);
    }
    for (int j = max; j < a.size(); j++) {
      rh.push_back(a[j]);
    }
    if (isPermutation(lh) && isPermutation(rh)) {
      count += 1;
      divs.emplace_back(max, n - max);
    }
    lh.clear();
    rh.clear();
    for (int j = 0; j < n - max; j++) {
      lh.push_back(a[j]);
    }
    for (int j = n - max; j < a.size(); j++) {
      rh.push_back(a[j]);
    }
    if (isPermutation(lh) && isPermutation(rh)) {
      if (n - max != max) {
        count += 1;
        divs.emplace_back(n - max, max);
      }
    }
    std::cerr << "===\\/" << std::endl;
    std::cout << count << std::endl;
    for (auto& div : divs) {
      std::cout << div.first << " " << div.second << std::endl;
    }
    std::cerr << "===/\\" << std::endl;
  }
  return 0;
}
