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;

constexpr int INF = 1e9;

int main() {
    int H, W;
    cin >> H >> W;
    vector<vector<int>> v(H, vector<int>(W));
    for(int i=0; i<H; ++i) {
        for(int j=0; j<W; ++j) {
            cin >> v[i][j];
        }
    }
    vector<vector<int>> sum(H, vector<int>(W+1));
    for(int i=0; i<H; ++i) {
        for(int j=W-1; j>=0; --j) {
            if(v[i][j] == 0) {
                sum[i][j] = sum[i][j+1] + 1;
            }
        }
    }
    int res = 0;
    for(int i=0; i<W; ++i) {
        stack<int> lst, rst;
        vector<int> L(H), R(H);
        for(int j=0; j<H; ++j) {
            while(!lst.empty() && sum[lst.top()][i] >= sum[j][i]) {
                lst.pop();
            }
            while(!rst.empty() && sum[rst.top()][i] >= sum[H-1-j][i]) {
                rst.pop();
            }
            if(sum[j][i] == 0) {
                L[j] = j;
            } else {
                L[j] = (lst.empty() ? 0 : lst.top() + 1);
            }
            if(sum[H-1-j][i] == 0) {
                R[H-1-j] = H-1-j;
            } else {
                R[H-1-j] = (rst.empty() ? H : rst.top());
            }
            lst.push(j);
            rst.push(H-1-j);
        }
        for(int j=0; j<H; ++j) {
            res = max(res, sum[j][i] * (R[j] - L[j]));
        }
    }
    cout << res << endl;
}
