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 <algorithm>
#include <cstdio>
#include <stack>

using namespace std;

#define MAX_W (1410)
#define MAX_H (1410)

typedef pair<int, int> Data;	// first: height, second: pos

int hist[MAX_H][MAX_W];
int tile[MAX_H][MAX_W];		// 0: clean, 1: dirty
int main()
{
    int H, W;
    scanf("%d %d", &H, &W);

    for ( int y = 0; y < H; y++ ) {
	for ( int x = 0; x < W; x++ ) {
	    scanf("%d", &tile[y][x]);
	}
    }

    for ( int y = 0; y < H; y++ ) {
	for ( int x = 0; x < W; x++ ) {
	    if ( tile[y][x] == 1 ) hist[y][x] = 0;
	    else {
		if ( y == 0 ) hist[y][x] = 1;
		else hist[y][x] = hist[y-1][x] + 1;
	    }
	}
    }

    int ans = 0;

    for ( int y = 0; y < H; y++ ) {
	stack<Data> S;
	for ( int x = 0; x < W; x++ ) {
	    if ( hist[y][x] > 0 ) {
		if ( S.empty() ) { // ????????´???
		    S.push( make_pair( hist[y][x], x ) );
		}
		else {
		    Data top = S.top();
		    if ( hist[y][x] > top.first ) {
			S.push( make_pair( hist[y][x], x ) );			
		    } 
		    else if ( hist[y][x] == top.first ) {
			// ???????????????
		    } 
		    else if ( hist[y][x] < top.first ) {
			int prePos = x;
			while ( !S.empty() ) {
			    Data top = S.top();
			    if ( hist[y][x] <= top.first ) {
				S.pop();
				ans = max( ans, top.first * ( x - top.second ) );
				prePos = top.second;
			    }
			    else {
				break;
			    }
			}
			S.push( make_pair( hist[y][x], prePos ) );
		    }
		}
	    }
	    else {
		while ( !S.empty() ) {
		    Data top = S.top(); S.pop();
		    ans = max( ans, top.first * ( x - top.second ) );
		}
		
	    }
	}
	while ( !S.empty() ) {
	    Data top = S.top(); S.pop();
	    ans = max( ans, top.first * ( W - top.second ) );
	}
    }

    printf("%d\n", ans);
    
    return 0;
}