Peter has an $n \times m$ matrix $M$. Let $S(a,b)$ be the sum of the weight all $a \times b$ submatrices of $M$. The weight of matrix is the sum of the value of all the saddle points in the matrix. A saddle point of a matrix is an element which is both the only largest element in its column and the only smallest element in its row. Help Peter find out all the value of $S(a,b)$.
Note: the definition of saddle point in this problem may be different with the definition you knew before.