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 <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <stack>
#pragma comment(linker,"/STACK:102400000,102400000")
#define INF 0x3f3f3f3f
#define maxm 1500
typedef long long ll;
using namespace std;
int mp[maxm][maxm]{0};
int t[maxm][maxm]{0};
int calRectangle(int (&vec)[maxm],int w,int time)
{
    int result=0;
    stack<int> stk;
    vec[w+1]=0;
    //if(true){for(int i=1;i<=w;i++)cout<<vec[i]<<" ";cout<<endl;}
    for(int i=1;i<=w+1;i++)
    {
        if(stk.empty()||vec[stk.top()]<=vec[i])
            stk.push(i);
        else
        {
            int temp=stk.top();
            stk.pop();
            result=max(result,vec[temp]*(stk.empty()?(i-1):(i-stk.top()-1)));
            i--;
        }
    }
    //cout<<result<<endl;
    return result;
}
int main()
{
    int h,w,pt,res=0;
    cin>>h>>w;
    for(int i=1;i<=h;i++)
        for(int j=1;j<=w;j++)
            cin>>mp[i][j];
    for(int j=1;j<=w;j++)
    {
        pt=1;
        for(int i=1;i<=h;i++)
            if(!mp[i][j])
                t[i][j]=pt++;
            else
            {
                t[i][j]=0;
                pt=1;
            }
    }
    //for(int i=1;i<=h;i++){for(int j=1;j<=w;j++)cout<<t[i][j]<<" ";cout<<endl;};
    for(int i=1;i<=h;i++)
        res=max(res,calRectangle(t[i],w,i));
    cout<<res<<endl;
    return 0;
}
//Do not use memset !

