N×M binary matrix. Please output the size of second large rectangle containing all. "1"means that the entries of the rectangle are all. ≤M. Then, the rectangle is composed of all the cell where. Please find out the size of the second largest rectangle, two rectangles are different if exists a cell belonged to one of them but not belonged to the other.
Given a N times M N×M binary matrix. Please output the size of second large rectangle containing all texttt{"1"} "1". Containing all texttt{"1"} "1" means that the entries of the rectangle are all texttt{"1"} "1". A rectangle can be defined as four integers x_1, y_1, x_2, y_2 x 1 ,y 1 ,x 2 ,y 2 where 1 leq x_1 leq x_2 leq N 1≤x 1 ≤x 2 ≤N and 1 leq y_1 leq y_2 leq M 1≤y 1 ≤y 2 ≤M. Then, the rectangle is composed of all the cell (x, y) where x_1 leq x leq x_2 x 1 ≤x≤x 2 and y_1 leq y leq y2 y 1 ≤y≤y2. If all of the cell in the rectangle is texttt{"1"} "1", this is a valid rectangle. Please find out the size of the second largest rectangle, two rectangles are different if exists a cell belonged to one of them but not belonged to the other.