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 <stack>
#include <algorithm>
using namespace std;
static const int MAX = 1405;

struct Rect { int pos, height; };
int G[MAX][MAX];
int H, W;

int getLargestRectangle(int buffer[])
{
    stack<Rect> S;
    int maxv = 0;
    buffer[W] = 0;

    for (int i = 0; i <= W; ++i)
    {
        Rect r;
        r.pos = i;
        r.height = buffer[i];
        if (S.empty())
        {
            S.push(r);
        }
        else
        {
            if (S.top().height < r.height)
            {
                S.push(r);
            }
            else if (S.top().height > r.height)
            {
                int target = i;
                while (!S.empty() && S.top().height >= r.height)
                {
                    Rect temp = S.top(); S.pop();
                    maxv = max(maxv, temp.height * (i - temp.pos));
                    target = temp.pos;
                }
                r.pos = target;
                S.push(r);
            }
        }
    }
    return maxv;
}

int main()
{
    cin >> H >> W;
    for (int i = 0; i != H; ++i)
    {
        for (int j = 0; j != W; ++j)
        {
            cin >> G[i][j];
            if (G[i][j])
            {
                G[i][j] = 0;
            }
            else
            {
                G[i][j] = (i > 0) ? G[i-1][j] + 1 : 1;
            }          
        }
    }

    int maxv = 0;
    for (int i = 0; i != H; ++i)
    {
        maxv = max(maxv, getLargestRectangle(G[i]));
    }
    cout << maxv << endl;
    return 0;
}
