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 <stack>
#include <algorithm>
using namespace std;
int w;
int b[1407][1407], pre[1407][1407];
int solve(int height[]) {
	int ret = 0;
	stack<pair<int, int> > s;
	for (int i = 1; i <= w + 1; i++) {
		if (s.empty()) s.push(make_pair(height[i], i));
		else {
			if (s.top().first < height[i]) s.push(make_pair(height[i], i));
			else if (s.top().first > height[i]) {
				int pos = i;
				while (!s.empty() && s.top().first >= height[i]) {
					pair<int, int> cur = s.top();
					int area = cur.first * (i - cur.second);
					s.pop();
					ret = max(ret, area);
					pos = cur.second;
				}
				s.push(make_pair(height[i], pos));
			}
		}
	}
	return ret;
}
int main() {
    int h, ans = 0;
    scanf("%d%d", &h, &w);
    for (int i = 1; i <= h; i++) {
    	for (int j = 1; j <= w; j++) {
    		scanf("%d", &b[i][j]);
		}
	}
	for (int i = 1; i <= h; i++) {
    	for (int j = 1; j <= w; j++) {
    		if (b[i][j] == 1) pre[i][j] = 0;
			else pre[i][j] = pre[i - 1][j] + 1;
		}
	}
	for (int i = 1; i <= h; i++) {
		ans = max(ans, solve(pre[i]));
	}
	printf("%d\n", ans);
	return 0;
}
