Second Large Rectangle
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given a binary matrix. Please output the size of second large rectangle containing all .

Containing all  means that the entries of the rectangle are all .

A rectangle can be defined as four integers x_1, y_1, x_2, y_2 where and . Then, the rectangle is composed of all the cell (x, y) where and . If all of the cell in the rectangle is , 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.

输入描述:

The first line of input contains two space-separated integers N and M.
Following N lines each contains M characters .




输出描述:

Output one line containing an integer representing the answer. If there are less than 2 rectangles containning all , output .
示例1

输入

复制
1 2
01

输出

复制
0
示例2

输入

复制
1 3
101

输出

复制
1