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;

#define ll long long
#define rep(i,x,y) for(ll i=x;i<y;i++)
#define rel(i,x,y) for(ll i=x-1;i>=y;i--)
#define all(x) x.begin(),x.end()
int hi,wi;
int G[1410][1410];
int hist[1410][1410];
ll histgram(int hig){
    ll h[wi+1];
    rep(i,0,wi) h[i] = hist[hig][i];
    h[wi] = 0; 
    stack<pair<ll,ll>> S; //height, locate
    ll ma = 0;
    rep(i,0,wi+1){
        if(S.empty()){ S.push(make_pair(h[i],i)); continue; }
        if(S.top().first == h[i]) continue;
        if( S.top().first < h[i]) S.push(make_pair(h[i],i)); //大きいのはstack
        else{
            ll LocateCheck = S.top().second;
            while((!S.empty()) && S.top().first >= h[i] ){
                ma = max(ma,S.top().first * (i-S.top().second));
                LocateCheck = S.top().second;
                S.pop();
            }
            S.push(make_pair(h[i],LocateCheck));
        }
    }
    
    return ma;
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    cin >> hi >> wi; //histgramのhとかぶるのでhi
    ll ma=0;
    rep(i,0,hi){
        rep(j,0,wi){
            cin >> G[i][j];
        }
    }
    //各行までのヒストグラムを作成
    rep(i,0,wi) hist[0][i] = abs(1-G[0][i]); /*0,1逆転*/// cout << hist[0][i] << " "; }
    rep(i,1,hi){
        rep(j,0,wi){
            if(G[i][j]==0) hist[i][j] = hist[i-1][j]+1;
            else hist[i][j] = 0;
          //  cout << hist[i][j] << " ";
        }
        //cout << endl;
    }
    rep(i,0,hi) ma = max(ma,histgram(i));
    cout << ma << endl;
}
