{"raw_statement":[{"iden":"problem statement","content":"We have a grid with $H$ horizontal rows and $W$ vertical columns. We denote by square $(i,j)$ the square at the $i$\\-th row from the top and $j$\\-th column from the left.\nWe want to cover this grid with $1 \\times 1$ tiles and $1 \\times 2$ tiles so that no tiles overlap and everywhere is covered by a tile. (A tile can be rotated.)\nEach square has `1`, `2`, or `?` written on it. The character written on square $(i, j)$ is $c_{i,j}$.  \nA square with `1` written on it must be covered by a $1 \\times 1$ tile, and a square with `2` by a $1 \\times 2$ tile. A square with `?` may be covered by any kind of tile.\nDetermine if there is such a placement of tiles."},{"iden":"constraints","content":"*   $1 \\leq H,W \\leq 300$\n*   $H$ and $W$ are integers.\n*   $c_{i,j}$ is one of `1`, `2`, and `?`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$H$ $W$\n$c_{1,1}c_{1,2}\\ldots c_{1,W}$\n$\\vdots$\n$c_{H,1}c_{H,2}\\ldots c_{H,W}$"},{"iden":"sample input 1","content":"3 4\n2221\n?1??\n2?21"},{"iden":"sample output 1","content":"Yes\n\nFor example, the following placement satisfies the conditions.\n![image](https://img.atcoder.jp/abc285/d984ec33355bac05ecebc41076d9a8df.png)"},{"iden":"sample input 2","content":"3 4\n2?21\n??1?\n2?21"},{"iden":"sample output 2","content":"No\n\nThere is no placement that satisfies the conditions."},{"iden":"sample input 3","content":"5 5\n11111\n11111\n11211\n11111\n11111"},{"iden":"sample output 3","content":"No"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}