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<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<list>
#include<string>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<ctime>
using namespace std;

typedef long long ll;
bool debug = false;
const int NIL = -1;
const int INF = 1000000000;
const int NUM = 1410;
clock_t START, END;
int G[NUM][NUM];

struct rect {
	int height, pos;
};

int main(void)
{
	if (debug) {
		START = clock();
		freopen("in29.txt", "r", stdin);
		freopen("out.txt", "w", stdout);
	};
	int H, W, t, maxArea = 0;
	cin >> H >> W;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> t;
			if (i == 0) {
				if (t)
					G[i][j] = 0;
				else
					G[i][j] = 1;
			}
			else {
				if (t)
					G[i][j] = 0;
				else
					G[i][j] = G[i - 1][j] + 1;
			}
		}
	}
	stack<rect> S;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			if (S.empty() || S.top().height <= G[i][j]) {
				S.push({ G[i][j], j });
			}
			else {
				int _pos = W;
				while (!S.empty() && S.top().height > G[i][j]) {
					maxArea = max(maxArea, S.top().height * (j - S.top().pos));
					_pos = min(_pos, S.top().pos);
					S.pop();
				}
				S.push({ G[i][j],_pos });
			}
		}
		while (!S.empty()) {
			maxArea = max(maxArea, S.top().height * (W - S.top().pos));
			S.pop();
		}
	}
	cout << maxArea << endl;
	if (debug) {
		END = clock();
		double endtime = (double)(END - START) / 1000;
		printf("total time = %lf s", endtime);
	}
	return 0;
}
