Given a matrix (H × W) which contains only 1 and 0, find the area of the largest rectangle which only contains 0s.

Constraints

* 1 ≤ H, W ≤ 1,400

Input


H W
c1,1 c1,2 ... c1,W
c2,1 c2,2 ... c2,W
:
cH,1 cH,2 ... cH,W


In the first line, two integers H and W separated by a space character are given. In the following H lines, ci,j, elements of the H × W matrix, are given.

Output

Print the area (the number of 0s) of the largest rectangle.

Example

Input

4 5
0 0 1 0 0
1 0 0 0 0
0 0 0 1 0
0 0 0 1 0


Output

6
#include <bits/stdc++.h>
using namespace std;
int a[1401][1401];
int cur_row[1401];
long long find_max_area_histogram(int m) {
    stack<int>s;
    long long max_area = 0;
    long long area = 0;
    int i = 0;
    int top_value = 0;
    while (i < m)
    {
        if (s.empty() || cur_row[i] >= cur_row[s.top()]) {
            s.push(i++);
        }
        else {
             top_value = cur_row[s.top()];
            s.pop();
            area = top_value*i;//incase stack is empty

            //if not empty then
            if (!s.empty()) {
                area = top_value*(i - 1 - s.top());
            }
            max_area = max(area, max_area);
        }
    }

    while (!s.empty())
    {
        int top_value = cur_row[s.top()];
        s.pop();
        area = top_value*i;//in case stack is empty

                           //if not empty then
        if (!s.empty()) {
            area = top_value*(i - 1 - s.top());
        }        
       max_area = max(area, max_area);
    }
    return max_area;
}
long long find_max_rectangle(int n, int m) {
    long long max_area = 0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++)
        {
            if (a[i][j]) {
                cur_row[j] += a[i][j];
            }
            else {
                cur_row[j] = 0;
            }
        }

        max_area = max(max_area, find_max_area_histogram(m));

    }
    return max_area;
}
int main() {

    long long n, m;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> a[i][j];
            a[i][j] = !a[i][j];
        }
    }
    

    long long answer = find_max_rectangle(n, m);
    cout << answer << endl;
    return 0;

}

