Write Ai,j for the element of matrix A in row i and column j. A matrix A with r rows and s columns is cool if both of these hold.
A matrix with at least two rows and at least two columns is extremely cool if every submatrix of it that has at least two rows and at least two columns is cool.
A submatrix is the rectangular region where a range of consecutive rows meets a range of consecutive columns.
Find an extremely cool submatrix of the given matrix and report the largest number of elements such a submatrix can have.
The first line contains two integers R and S, the dimensions of the matrix (2≤R,S≤1000).
Each of the next R lines contains S integers, one row of the matrix. Every element is an integer between −106 and 106.
Print one line with the largest number of elements an extremely cool submatrix of the given matrix has. If the matrix has no extremely cool submatrix, print 0.