Problem Statement
--------
There are $N(N+1)/2$ balls arranged in an $N$-tiered pyramid as shown in the figure below.
Let $(0, 0)$ be the coordinates of the ball at the top of the pyramid, and let $(x,y)$ be the coordinates of the $y (0\leq y\leq x)$-th ball from the left in the $x (0\leq x-1)$-th tier from the top.


<figure>
	<img src="./images/d17182d7.png">
</figure>

Each ball is labeled with a number from $0$ to $N(N+1)/2-1$, and the numbers on each ball are all different.
You can swap two adjacent balls in six directions in a single operation.
Here, the balls at coordinates $(x_1,y_1)$ and $(x_2,y_2)$ are adjacent in six directions if one of the following conditions is satisfied.


- $x_1=x_2-1$ and $y_1=y_2-1$
- $x_1=x_2-1$ and $y_1=y_2$
- $x_1=x_2$ and $y_1=y_2-1$
- $x_1=x_2$ and $y_1=y_2+1$
- $x_1=x_2+1$ and $y_1=y_2$
- $x_1=x_2+1$ and $y_1=y_2+1$

By performing this operation at most $10000$ times, please arrange the balls so that every ball $(x,y) (0\leq x\leq N-2, 0\leq y\leq x)$ except those in the lowest tier has a smaller number than the two balls $(x+1,y), (x+1,y+1)$ directly below it.
Please achieve this with as few operations as possible.


<figure>
	<img src="./images/d17182d7.gif">
</figure>



Scoring
--------
Let $K$ be the number of operations and $E$ be the number of pairs of balls violating the condition after finishing the operations.
Here $E$ is the total number of pairs of $(x,y)$ and $(x+1,y') (y'\in\\{y,y+1\\})$ such that the ball $(x,y)$ has a larger number than the ball $(x+1,y')$.
Then you will obtain the following score.

- If $E=0$, $100000-5K$.
- If $E>0$, $50000-50E$.


There are 150 test cases, and the score of a submission is the total score for each test case.
If your submission produces an illegal output or exceeds the time limit for some test cases, the submission itself will be judged as <span class='label label-warning' data-toggle='tooltip' data-placement='top' title="Wrong Answer">WA</span> or <span class='label label-warning' data-toggle='tooltip' data-placement='top' title="Time Limit Exceeded">TLE</span> , and the score of the submission will be zero.
The highest score obtained during the contest will determine the final ranking, and there will be no system test after the contest.
If more than one participant gets the same score, they will be ranked in the same place regardless of the submission time.


Input
--------
The number of pyramid tiers is fixed to $N=30$ for all inputs, and the total number of balls is $N(N+1)/2=465$.
Input is given from Standard Input in the following format:
~~~
$b_{0,0}$
$b_{1,0}$ $b_{1,1}$
$b_{2,0}$ $b_{2,1}$ $b_{2,2}$
$\vdots$
$b_{29,0}$ $\cdots$ $b_{29,29}$
~~~

$b_{x,y}$ is an integer satisfying $0\leq b_{x,y}\leq 464$ and represents the number written on the ball initially at the coordinates $(x,y)$.
All the numbers are distinct.


Output
--------
Let $K$ be the number of operations and $(x_i,y_i), (x'_i,y'_i)$ be the coordinates of the two balls to be swapped in the $i$-th operation.
Then, output to Standard Output in the following format.

~~~
$K$
$x_0$ $y_0$ $x'_0$ $y'_0$
$\vdots$
$x_{K-1}$ $y_{K-1}$ $x'_{K-1}$ $y'_{K-1}$
~~~

The number of operations $K$ must not exceed $10000$ and any two balls to be swapped must be adjacent in 6 directions.
If not satisfied, the submission will be judged as <span class='label label-warning' data-toggle='tooltip' data-placement='top' title="Wrong Answer">WA</span> .



<a href="https://img.atcoder.jp/ahc021/d17182d7.html?lang=ja&seed=0&output=15%0D%0A2+0+3+1%0D%0A8+5+9+5%0D%0A24+5+25+6%0D%0A9+5+10+6%0D%0A10+10+11+10%0D%0A1+0+2+1%0D%0A28+9+29+10%0D%0A0+0+1+0%0D%0A18+7+19+8%0D%0A18+18+19+19%0D%0A20+5+21+5%0D%0A11+0+12+1%0D%0A27+12+28+12%0D%0A19+1+20+2%0D%0A7+3+8+3%0D%0A">Show example</a>


Input Generation
--------
The input is generated by randomly shuffling $465$ balls with numbers $0$ to $464$.

Tools (Input generator and visualizer)
--------
- <a href="https://img.atcoder.jp/ahc021/d17182d7.html?lang=en">Web version</a>: This is more powerful than the local version providing animations.
- <a href="https://img.atcoder.jp/ahc021/d17182d7.zip">Local version</a>: You need a compilation environment of <a href="https://www.rust-lang.org/">Rust language</a>.
	- <a href="https://img.atcoder.jp/ahc021/d17182d7_windows.zip">Pre-compiled binary for Windows</a>: If you are not familiar with the Rust language environment, please use this instead.

Please be aware that sharing visualization results or discussing solutions/ideas during the contest is prohibited.
