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>
using namespace std;

struct Rectangle {
    int height;
    int pos;
};

int main()
{
    int H, W;
    cin >> H >> W;
    int color;
    int Table[H + 1][W + 1];
    for(int i = 0; i <= W; i++)
        Table[0][i] = 0;

    for(int i = 1; i <= H; i++)
    {
        for(int j = 1; j <= W; j++)
        {
            cin >> color;
            Table[i][j] = (color == 0 ? Table[i - 1][j] + 1 : 0);
        }
    }

    /*
    for(int i = 1; i <= H; i++)
    {
        cout << Table[i][1];
        for(int j = 2; j <= W; j++)
        {
            cout << " " << Table[i][j];
        }
        cout << endl;
    }
     */

    int max_area = 0;
    for(int i = 1; i <= H; i++)
    {
        stack<Rectangle> S;
        for(int j = 1; j <= W + 1; j++)
        {
            Rectangle rect{};
            rect.height = (j == W + 1 ? 0 : Table[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)
                    {
                        Rectangle pre = S.top();
                        S.pop();
                        max_area = max(max_area, pre.height * (j - pre.pos));
                        target = pre.pos;
                    }
                    rect.pos = target;
                    S.push(rect);
                }
            }
        }
    }

    cout << max_area << endl;
}
