{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"### Read problems statements in [Mandarin Chinese](https://www.codechef.com/download/translated/COOK128/mandarin/ARRAYOPS.pdf), [Russian](https://www.codechef.com/download/translated/COOK128/russian/ARRAYOPS.pdf), and [Bengali](https://www.codechef.com/download/translated/COOK128/bengali/ARRAYOPS.pdf) as well.\r\n\r\nChef has an array $a_1,\\ldots,a_n$ of $n$ elements. Initially, all elements of the array are equal to $1$. There are two types of operations. \r\n\r\n- $1$ $i$: Take the index $i$ ($1 \\le i \\le n$), and multiply it by $2$ ($a_i :\u003d 2 \\cdot a_i$).\r\n\r\n- $2$ $i$ $j$: Take two indexes $i$ and $j$ ($1 \\le i, j \\le n, i \\ne j$), and subtract $a_j$ from $a_i$, ($a_i :\u003d a_i - a_j$).\r\n\r\nAll elements must be positive after each operation, and at most $10^9$. \r\n\r\nIn addition, you are given an array $b$. Chef wants to make $b$ from $a$. Help Chef to reach the array $b$ in no more than $43\\ 000$ operations, or determine it is impossible.\r\n\r\n### Input:\r\n\r\n- The first line contains a single integer $n$ - size of the array.\r\n\r\n- The second line contains $n$ integers $b_1, \\ldots b_n$ - the array $b$. \r\n\r\n### Output:\r\n\r\nIf it is impossible to reach $b$, print $-1$.\r\n\r\nOtherwise, output $k$ - the number of operations ($0 \\le k \\le 43\\ 000$). On the next $k$ lines, print the operations as described in the statement.\r\n\r\nIf there are multiple solutions, you may output any.\r\n\r\n### Constraints \r\n- $1 \\leq n \\leq 10^3$\r\n- $1 \\leq b_i \\leq 10^6$"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n\r\n1 2 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n\r\n1 3\r\n\r\n1 3\r\n\r\n2 3 1\r\n\r\n1 2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n**Test Case 1:** Initially, the array $a$ is $[1,1,1]$.\r\n\r\nBy the first operation, $a_3:\u003d2\\cdot a_3$, so the array becomes $[1,1,2]$.\r\n\r\nBy the second operation, $a_3:\u003d2\\cdot a_3$, so the array becomes $[1,1,4]$.\r\n\r\nBy the third operation, $a_3:\u003da_3-a_1$, so the array becomes $[1,1,3]$.\r\n\r\nBy the fourth operation, $a_2:\u003d2\\cdot a_2$, so the array becomes $[1,2,3]$. Now the array is equal to $b$, as desired."}}]}