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<stdio.h>
#include<algorithm>
#include<stack>
#include<utility>
using namespace std;

const int MAX = 1400;

int main() {
	int H, W;
	int tile[MAX][MAX];
	int ans = 0;

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

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

	for (int x = 0; x < W; x++) {
		stack<pair<int, int>> s;
		s.push(pair<int, int>(-1, -1));
		for (int y = 0; y < H; y++) {
			if (s.top().second < tile[y][x]) {
				s.push(pair<int, int>(y, tile[y][x]));
			}
			else if (s.top().second > tile[y][x]) {
				int m = y;
				int t = s.top().second;
				while (s.top().second > tile[y][x]) {
					ans = max(ans, (y - s.top().first) * s.top().second);
					m = min(m, s.top().first);
					s.pop();
				}
				if (s.top().second != tile[y][x]) s.push(pair<int, int>(m, tile[y][x]));
			}
		}
		while (!s.empty()) {
			ans = max(ans, (H - s.top().first) * s.top().second);
			s.pop();
		}
	}

	printf("%d\n", ans);

	return 0;
}