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<stack>
using namespace std;

int h, w;
int T[1401][1401];

struct Rect	{
	int height, prepos;
};

class Tile {
public:
	Tile() {
		for (int i = 0; i < h; i++)	{
			T[i][w] = 0;
			for (int j = 0; j < w; j++) {
				if (!i) T[i][j] = (T[i][j] + 1) % 2;
				else {
					T[i][j] = T[i][j] ? 0 : T[i - 1][j] + 1;
				}
			}
		}
	}

	int largestRectangle(int row) { //???????????°????????¨????????????
		int maxR = 0;
		stack<Rect> R;
		
		for (int j = 0; j <= w; j++) {
			Rect rect;
			rect.height = T[row][j];
			rect.prepos = j;
			if (R.empty()) {
				R.push(rect);
			} else {
				if (rect.height > R.top().height) {
					R.push(rect);
				} else if (rect.height < R.top().height) {
					int target = j; //???????????????index????§?????????????
					while (!R.empty() && rect.height <= R.top().height) { //???????????????????????±????????????????¶??????????????¨???°????\???????????????????
						maxR = max(maxR, R.top().height * (j - R.top().prepos));
						target = R.top().prepos;
						R.pop();
					}
					rect.prepos = target;
					R.push(rect);
				}
			}
		}
		return maxR;
	}

	int largestRectangle() {
		int maxS = 0;
		for (int i = 0; i < h; i++) {
			maxS = max(maxS, largestRectangle(i));
		}
		return maxS;
	}

	

};

int main() {
	cin >> h >> w;
	for (int i = 0; i < h; i++)	{
		for (int j = 0; j < w; j++) {
			cin >> T[i][j];
		}
	}

	Tile t = Tile();

	cout << t.largestRectangle() << endl;
	return 0;

}