Hyundai AutoEver is a company leading the future of mobility innovation, transforming the paradigm of smart logistics in the Fourth Industrial Revolution.
Hyundai AutoEver is testing a smart warehouse in which items are placed in the form of an $N \times M$ grid. Let's denote the cell in the $r$-th row from the top and the $c$-th column from the left as $(r, c)$. Each cell $(r, c)$ has an item whose value is $A_{rc}$. The value of an item can be negative.
A robot in the warehouse is sometimes instructed to transport an item outside. For efficient transportation, the robot can also transport nearby items together as a rectangular group. Specifically, suppose the robot is instructed to transport an item at cell $(r, c)$. In that case, the robot selects four integers $r_1$, $r_2$, $c_1$, $c_2$ such that $1 \le r_1 \le r \le r_2 \le N$, $1 \le c_1 \le c \le c_2 \le M$, and then transports all items inside the rectangular area $[r_1, r_2] \times [c_1, c_2]$.
For each of the $NM$ items, calculate the maximum sum of values of the items that can be transported when the robot is instructed to transport the item.
Input
The first line of input contains two space-separated integers $N$ and $M$, denoting the size of the warehouse. ($2 \le N \le 500$; $2 \le M \le 500$)
The $r$-th of the following $N$ lines contains $M$ space-separated integers $A_{r1}$, $A_{r2}$, $\cdots$, $A_{rM}$, which correspond to the value of each item in the $r$-th row of the grid. ($-10^3 \le A_{rc} \le 10^3$)
Output
Print $N$ lines in total. In the $r$-th line of output, print $M$ integers, which denote the maximum sum of values of the items that can be transported when the robot is instructed to transport the item at each of the cells $(r, 1)$, $(r, 2)$, $\cdots$, $(r, M)$.
Examples
Input 1
3 4 2 2 2 2 2 -8 0 -12 2 -8 7 5
Output 1
8 8 9 8 6 1 9 4 6 6 12 12
Input 2
2 2 -1 -3 2 -1
Output 2
1 -3 2 1