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 <algorithm>
#include <cstring>
#include <stack>
using namespace std;

const int Max = 1500;
struct Node
{
    int height, pos;
};
int H, W;
int G[Max][Max], T[Max][Max];

int main()
{
    cin >> H >> W;
    for(int i=0; i<H; i++)
    {
        for(int j=0; j<W; j++)
        {
            cin >> G[i][j];
        }
    }
    //标记
    for(int j=0; j<W; j++)
    {
        for(int i=0; i<H; i++)
        {
            if(G[i][j])
            {
               T[i][j] = 0;
            }
            else
            {
                if(i==0)
                    T[i][j] = 1;
                else
                    T[i][j] = T[i-1][j]+1;
            }
            //cout << T[i][j] << " ";
        }
       // cout << endl;
    }

    //栈式动态规划
    stack<Node> S;
    int maxv = 0, area = 0;
    for(int i=0; i<H; i++)
    {
        T[i][W] = 0;
        for(int j=0; j<=W; j++)
        {
            Node rect;
            rect.height = T[i][j];
            rect.pos = j;
            if(S.empty())
                S.push(rect);
            else
            {
                if(S.top().height<rect.height)
                {
                    S.push(rect);
                }
                else if(S.top().height>rect.height)
                {
                    int target = j;
                    while(!S.empty() && S.top().height>=rect.height)
                    {
                        Node pre = S.top(); S.pop();
                        area = (j-pre.pos)*pre.height;
                        maxv = max(maxv, area);
                        target = pre.pos;
                    }
                    rect.pos = target;
                    S.push(rect);
                }
            }
        }
    }
    cout << maxv << endl;
    return 0;
}

