Problem: The sequence of integers is called the permutation if it contains all integers from to exactly once. The number is called the length of the permutation.
Dreamoon has two permutations and of non-zero lengths and .
Now Dreamoon concatenates these two permutations into another sequence of length . First elements of is the permutation and next elements of is the permutation .
You are given the sequence , and you need to find two permutations and . If there are several possible ways to restore them, you should find all of them. (Note that it is also possible that there will be no ways.)
Input Format: The first line contains an integer () denoting the number of test cases in the input.
Each test case contains two lines. The first line contains one integer (): the length of . The second line contains integers ().
The total sum of is less than .
Output Format: For each test case, the first line of output should contain one integer : the number of ways to divide into permutations and .
Each of the next lines should contain two integers and (), denoting, that it is possible to divide into two permutations of length and ( is the first elements of , and is the last elements of ). You can print solutions in any order.
Note: In the first example, two possible ways to divide into permutations are and .
In the second example, the only way to divide into permutations is .
In the third example, there are no possible ways.