There is an grid. Initially, every cell is intact.
Break exactly cells. Then write each integer exactly once in the remaining cells.
Let integers satisfy . Keep only the cells whose written values satisfy . The interval is called a if these cells form one connected component. Two cells are adjacent only when they share a side.
Your goal is to make every interval not good. Find the minimum possible number of broken cells and construct one grid attaining that minimum.
If at most one cell remains intact, there is no interval satisfying , so the condition is satisfied automatically.
The input is given in the following format.
On the first line, print the minimum possible number of broken cells.
On the next lines, print integers to describe the grid.
If there are multiple optimal constructions, print any of them.