AT_abc458_b [ABC458B] Count Adjacent Cells

Description

There is a grid with $ H $ rows and $ W $ columns. The cell at the $ i $ -th row from the top and the $ j $ -th column from the left is denoted as cell $ (i, j) $ . Cells $ (x_1, y_1) $ and $ (x_2, y_2) $ are said to be **edge-adjacent** when $ |x_1 - x_2| + |y_1 - y_2| = 1 $ . For every cell, find the number of cells that are edge-adjacent to it.

Input Format

The input is given from Standard Input in the following format: > $ H $ $ W $

Output Format

Output the answer in the following format: > $ x_{1,1} $ $ x_{1,2} $ $ \cdots $ $ x_{1,W} $ > > $ x_{2,1} $ $ x_{2,2} $ $ \cdots $ $ x_{2,W} $ > > $ \vdots $ > > $ x_{H,1} $ $ x_{H,2} $ $ \cdots $ $ x_{H,W} $ Here, $ x_{i,j} $ represents the number of cells that are edge-adjacent to cell $ (i, j) $ .

Explanation/Hint

### Sample Explanation 1 The cells edge-adjacent to cell $ (1, 5) $ are cells $ (1, 4), (2, 5) $ , for a total of two cells. The cells edge-adjacent to cell $ (2, 3) $ are cells $ (1, 3), (2, 2), (2, 4), (3, 3) $ , for a total of four cells. The cells edge-adjacent to cell $ (4, 2) $ are cells $ (3, 2), (4, 1), (4, 3) $ , for a total of three cells. ### Sample Explanation 2 There are no cells edge-adjacent to cell $ (1, 1) $ . ### Constraints - $ 1 \leq H, W \leq 50 $ - All input values are integers.