- the table with the numbers from the set ; columns and lines of the table are numbered from to ; the number in -th column and -th line of the table is denoted by .
If and are two positions in the table , the distance between them is .
The table , , should be computed, where (the number in -th column and -th line of the table ) is equal to the sum of all the numbers , such that the distance between and is not greater than .
Write a program, which:
reads integers , and the table from the standard input,
computes the table ,
writes the table to the standard output.
In the first line of standard input there are two positive integers separated by a single space: and , where . In the following lines the table is described. Each of these lines contains integers from the set , separated by single spaces. The -th number written in -st line is equal to .
The standard output should contain exactly lines. In the -th line the values should be written respectively; they should be separated by single spaces.