{"raw_statement":[{"iden":"problem statement","content":"There is a grid of square cells with $H$ horizontal rows and $W$ vertical columns. The cell at the $i$\\-th row and the $j$\\-th column will be denoted as Cell $(i, j)$.\nIn Cell $(i, j)$, $a_{ij}$ coins are placed.\nYou can perform the following operation any number of times:\nOperation: Choose a cell that was not chosen before and contains one or more coins, then move one of those coins to a vertically or horizontally adjacent cell.\nMaximize the number of cells containing an even number of coins."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq H, W \\leq 500$\n*   $0 \\leq a_{ij} \\leq 9$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$\n$a_{11}$ $a_{12}$ $...$ $a_{1W}$\n$a_{21}$ $a_{22}$ $...$ $a_{2W}$\n$:$\n$a_{H1}$ $a_{H2}$ $...$ $a_{HW}$"},{"iden":"sample input 1","content":"2 3\n1 2 3\n0 1 1"},{"iden":"sample output 1","content":"3\n2 2 2 3\n1 1 1 2\n1 3 1 2\n\nEvery cell contains an even number of coins after the following sequence of operations:\n\n*   Move the coin in Cell $(2, 2)$ to Cell $(2, 3)$.\n*   Move the coin in Cell $(1, 1)$ to Cell $(1, 2)$.\n*   Move one of the coins in Cell $(1, 3)$ to Cell $(1, 2)$."},{"iden":"sample input 2","content":"3 2\n1 0\n2 1\n1 0"},{"iden":"sample output 2","content":"3\n1 1 1 2\n1 2 2 2\n3 1 3 2"},{"iden":"sample input 3","content":"1 5\n9 9 9 9 9"},{"iden":"sample output 3","content":"2\n1 1 1 2\n1 3 1 4"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}