#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int NINF = 0xc0c0c0c0;
const int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const long long maxn = 1e6 + 5;
const int N = 2e5 + 5;
int n, a[N], mx, ans_cnt, ans[N][2];
bool vis[N];
bool check(int *a, int n) {
  for (int i = 1; i <= n; i++) vis[i] = 0;
  for (int i = 1; i <= n; i++) vis[a[i]] = 1;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) return 0;
  }
  return 1;
}
bool judge(int x, int y) { return check(a, x) && check(a + x, y - x); }
void solve() {
  ans_cnt = 0;
  cin >> n;
  mx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mx = max(a[i], mx);
  }
  if (judge(n - mx, n)) {
    ans[++ans_cnt][0] = n - mx;
    ans[ans_cnt][1] = mx;
  }
  if (mx * 2 != n && judge(mx, n)) {
    ans[++ans_cnt][0] = mx;
    ans[ans_cnt][1] = n - mx;
  }
  cout << ans_cnt << '\n';
  for (int i = 1; i <= ans_cnt; i++) {
    cout << ans[i][0] << " " << ans[i][1] << '\n';
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
