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 <vector>
#include <algorithm>
#include <iterator>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <string>
#include <cmath>
using namespace std;
#define MOD 1000000007
#define INF 1<<30
#define LINF (ll)1<<62
#define rep(i,n) for(ll i=0; i<(n); i++)
#define REP(i,a,b) for(ll i=(a); i<(b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> P;
typedef vector<pair<ll, ll>> vpl;

ll min3(ll a, ll b, ll c){
    if(a < b){
        if(b < c) return a;
        else{
            if(a < c) return a;
            else return c;
        }
    }else{
        if(b < c) return b;
        else return c;
    }
}

int main(){
    ll h,w; cin >> h >> w;
    ll c[h][w];
    rep(i,h){
        rep(j,w){
            cin >> c[i][j];
        }
    }
    vvl masu(h+1, vl(w+1,0));
    REP(i,1,h+1){
        REP(j,1,w+1){
            if(c[i-1][j-1] == 1) masu[i][j] = 0;
            else masu[i][j] = masu[i-1][j] + 1;
        }
    }
    ll mx = 0;
    stack<P> st;
    for(ll i=h; i>0; i--){
        for(ll j=w; j>0; j--){
            if(j==w) st.emplace(masu[i][j],w);
            else{
                if(st.empty() || masu[i][j] > masu[i][j+1]){
                    st.emplace(masu[i][j],j);
                }else if(masu[i][j] < masu[i][j+1]){
                    ll index;
                    while(!st.empty()){
                        if(st.top().first < masu[i][j]){
                            st.emplace(masu[i][j],index);
                            break;
                        }
                        auto t = st.top(); st.pop();
                        index = t.second;
                        mx = max(mx, t.first * (t.second - j));
                        //cout << mx << " " << i << j << endl;
                    }
                    if(st.empty()) st.emplace(masu[i][j],index);
                }
            }
        }
        //cout << st.size() << endl;
        while(!st.empty()){
            auto t = st.top(); st.pop();
            mx = max(mx, t.first * t.second);
        }
    }
    cout << mx << endl;
}
