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 mp(x,y) (make_pair(x,y))
typedef pair<int,int> pii;
typedef vector<int> Vec;
typedef vector<Vec> Mat;

int getMaxArea(Vec &h)
{
    int n=h.size();
    vector<int> l(n),r(n);
    stack<pii> st;
    for(int i=0;i<n;i++)
    {
        while(!st.empty()&&st.top().first>=h[i])
        {
            st.pop();
        }
        if(!st.empty())
        {
            l[i]=st.top().second+1;
        }else
        {
            l[i]=0;
        }
        st.push(mp(h[i],i));
    }
    while(!st.empty())
    {
        st.pop();
    }
    for(int i=n-1;i>=0;i--)
    {
        while(!st.empty()&&st.top().first>=h[i])
        {
            st.pop();
        }
        if(!st.empty())
        {
            r[i]=st.top().second;
        }else
        {
            r[i]=n;
        }
        st.push(mp(h[i],i));
    }
    int area=0;
    for(int i=0;i<n;i++)
    {
        area=max(area,h[i]*(r[i]-l[i]));
    }
    return area;
}

int main()
{
    int H,W;
    while(cin>>H>>W)
    {
        Mat mat(H,Vec(W));
        for(int i=0;i<H;i++)
        {
            for(int j=0;j<W;j++)
            {
                cin>>mat[i][j];
            }
        }
        Vec h(W);
        int area=0;
        for(int i=0;i<H;i++)
        {
            for(int j=0;j<W;j++)
            {
                if(mat[i][j])
                {
                    h[j]=0;
                }else
                {
                    h[j]++;
                }
            }
            area=max(area,getMaxArea(h));
        }
        cout<<area<<endl;
    }

    return 0;
}

