#415. Maximal submatrix

Maximal submatrix

Description

Given a matrix of n rows and m columns,find the largest area submatrix which is non decreasing on each column

Format

Input

The first line contains an integer T(1T10)T(1≤T≤10)representing the number of test cases. For each test case, the first line contains two integers n,m(1n,m2103)n,m(1≤n,m≤2∗10^3)representing the size of the matrix the next nn line followed. the ii-th line contains mm integers vi,j(1vi,j5103)v_{i,j}(1≤v_{i,j}≤5∗10^3)representing the value of matrix It is guaranteed that there are no more than 22 testcases with nm>10000n∗m>10000

Output

For each test case, print a integer representing the Maximal submatrix

Samples

1
2 3
1 2 4
2 3 3
4