Matrix in "slash" order Given two positive numbers N &gt;= 2 and N &lt;= 100 create a matrix which follows the following rules:


First Number starts at position [0,0]
Second Number starts at position [0,1]
Third number goes below First Number (position [1,0])
Following numbers goes in "slash" direction
Range of numbers used is [1, N1 * N2]. So, numbers goes from starting 1 to the result of the multiplication of both inputs.


Input


Two numbers N &gt;= 2 and N &lt;= 100. First number is the amount of rows, Second number the amount of columns. 


Output


Matrix. (Can be outputted as a multidimensional array or a string with line breaks)


Example:

Given numbers 3 and 5 output:

1   2   4   7   10
3   5   8   11  13
6   9   12  14  15


Given numbers 2 and 2

1   2
3   4


Given Numbers 5 and 5

1   2   4   7   11
3   5   8   12  16
6   9   13  17  20
10  14  18  21  23
15  19  22  24  25


The shortest code in bytes wins.
Jelly, 6 5 bytes

pSÞỤs


Try it online!

How it works

pSÞỤs  Main link. Left argument: n. Right argument: k

p      Take the Cartesian product of [1, ..., n] and [1, ..., k], yielding
       [[1, 1], [1, 2], ..., [n, k-1], [n, k]].
 SÞ    Sort the pairs by their sums.
       Note that index sums are constant on antidiagonals.
   Ụ   Grade up, sorting the indices of the sorted array of pairs by their values.
    s  Split the result into chunks of length k.