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 <cstdio>
#include <algorithm>
#include <stack>
using namespace std;
const int M = 1500;

struct Rectangle {int hei, pos;};
int a[M][M];
int t[M][M];

int GetMax(int w, int buffer[])
{
	stack<Rectangle> s;
	buffer[w] = 0;
	int maxs = 0;	
	
	for (int i = 0; i <= w; ++i)
	{
		Rectangle cur;
		cur.hei = buffer[i];
		cur.pos = i;
		
		if (s.empty()) s.push(cur);
		else
		{
			if (s.top().hei < cur.hei) s.push(cur);
			else if (s.top().hei > cur.hei)
			{
				int tmp = cur.pos;
				while (!s.empty() && s.top().hei >= cur.hei)
				{
					Rectangle pre = s.top(); s.pop();
					int area = pre.hei * (i - pre.pos);
					maxs = max(maxs, area);
					tmp = pre.pos;
				}
				cur.pos = tmp;
				s.push(cur);				
			}
		}
	}
	
	return maxs;
}

int GetMaxRectangle(int h, int w)
{
	for (int j = 0; j < w; ++j)
		for (int i = 0; i < h; ++i)
			if (a[i][j])	t[i][j] = 0;
			else t[i][j] = i ? t[i-1][j]+1 : 1;
		
	int maxs = 0;
	for (int i = 0; i < h; ++i)
		maxs = max(maxs, GetMax(w, t[i]));	
	
	return maxs;
}


int main()
{
	int h, w;
	scanf("%d %d", &h, &w);
	for (int i = 0; i < h; ++i)
		for (int j = 0; j < w; ++j)
			scanf("%d", &a[i][j]);
	
	printf("%d\n", GetMaxRectangle(h, w));
	return 0;
}
