B. Be knocked off
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

You have a keyboard with the numeric keys $$$0,1,2,\cdots,9$$$.

For any positive integer $$$m$$$, you can obviously always type a positive integer that is a multiple of $$$m$$$.

Now, $$$k$$$ of your positive integer keys have been knocked off, but you still want to type a positive integer that is a multiple of $$$m$$$.

Input

Each test contains multiple test cases. The first line contains an integer $$$T(1 \leq T \leq 5 \times 10^4)$$$, representing the number of test cases.

For each test case:

The first line contains two positive integers $$$m, k(1 \leq m \leq 10^7, 0 \leq k \leq 9)$$$, indicating that after $$$k$$$ keys are removed, you need to press a sequence of keys to produce a positive integer that is a multiple of $$$m$$$.

The second line gives $$$k$$$ distinct positive integers $$$p_i(1\leq p_i \leq 9)$$$, representing the removed keys.

Output

For each test case:

If a solution exists, output your operations as a sequence of multiple "press digit $$$a$$$ for $$$b$$$ times" operations: The first line outputs an integer $$$n$$$, where $$$1 \leq n \leq 100$$$, representing the number of operations required.

The next $$$n$$$ lines each output two integers $$$a,b$$$ ($$$0 \leq a \leq 9, 1 \leq b \leq 10^{18}$$$), representing one operation "press digit $$$a$$$ for $$$b$$$ times".

If no solution exists, output a single line containing $$$-1$$$.

Example
Input
2
37 7
2 3 5 6 7 8 9
7 9
1 2 3 4 5 6 7 8 9
Output
2
1 3
0 1
-1
Note

For the first test case in the example, the positive integer output is $$$1110$$$. Since $$$1110 = 37 \times 30$$$, it is a multiple of $$$37$$$.