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<iostream>
#include<cstdio>
#include<stack>
using namespace std;

static const int MAX = 1400;

int h, m;

int c[MAX + 1][MAX + 1];

int dp[MAX + 1][MAX + 1];

void histmake(){
    for (int i = 1; i <= h; i++){
        for (int j = 1; j <= m; j++){
            if (c[i][j] == 1) dp[i][j] = 0;
            else dp[i][j] = dp[i - 1][j] + 1;
        }
    }
    return;
}

void solve(){
    int ans = 0;
    stack<pair<int, int> > s;

    int pos;
    for (int i = 1; i <= h; i++){
        for (int j = 1; j <= m; j++){
            if (dp[i][j] == 0){
                while (!s.empty()){
                    ans = max(ans, s.top().first * (j - s.top().second));
                    s.pop();
                }
            }
            else if (s.empty()) s.push(make_pair(dp[i][j], j));
            else if (s.top().first < dp[i][j]) s.push(make_pair(dp[i][j], j));
            else if (s.top().first == dp[i][j]) continue;
            else{
                while ((!s.empty()) && s.top().first > dp[i][j]){
                    ans = max(ans, s.top().first * (j - s.top().second));
                    pos = s.top().second;
                    s.pop();
                }
                s.push(make_pair(dp[i][j], pos));
            }
        }
        while (!s.empty()){
            ans = max(ans, s.top().first * (m - s.top().second + 1));
            s.pop();
        }
    }

    cout << ans << endl;

    return;
}

int main(){
    cin >> h >> m;

    for (int i = 1; i <= h; i++){
        for (int j = 1; j <= m; j++){
            scanf("%d", &c[i][j]);
        }
    }

    histmake();
    solve();

    return 0;
}


