In the first line, output the minimum number of operations needed.
In the next lines, output two integers and , representing the operation in the sequence of operations that makes all equal to .
If there are multiple such sequences, output any one of them.