For each test case, if there is no solution, print $\texttt{-1}$ in a single line.
Otherwise, the first line of the output contains an integer $k$, indicating the minimum number of edges you add. In the following $k$ lines, the $i$-th line contains two integers $c_i$ and $d_i$ ($1 \leq c_i,d_i \leq n$), indicating an edge you add between the $c_i$-th vertex in set $A$ and the $d_i$-th vertex in set $B$.
As there may be multiple valid solutions, you need to output the answer which makes the sequence $c_1,d_1,c_2,d_2,\ldots ,c_k,d_k$ have the smallest lexicographical order. Sequence $p_1, p_2, \dots, p_n$ is lexicographically smaller than $q_1, q_2, \dots, q_n$ if $p_i < q_i$ where $i$ is the minimum index satisfying $p_i \neq q_i$.