Alice and Bob want to play a game. They have a matrix N×M that should be only from 0 to 1.
Alice makes an arbitrary (possibly zero) number of complete horizontal cuts of the matrices and Bob makes an arbitrary (possibly zero) number of the upper vertical cuts. After making all the cuts, the matrix is decomposed into a number of rectangular submatrices. Since Bob is very fond of a matrix of 1, he wants the number of whole submatrices that consist exclusively of units, to be as large as possible after all the cuts. Alice wants to keep this amount as small as possible.
Note that they are not interested in what size the submatrices will be, their focus is on the number.
To be fair, John will ask Alice and Bob individually and independently where the cuts are to be made and then he will make the cuts instead.
Based on the provided size of the matrix and the matrix itself, write a program that prints the number of submatrices that are formed after all the cuts considering the optimal actions of Alice and Bob.
Input format
Output format
Print a single number denoting the answer to the problem.
Constraints
2≤N,M≤1000
In first test Bob make 3 vertical cuts, Alice - 0 horizontal cuts.