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 <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <bitset>
#include <iomanip>
#include <limits>
#include <chrono>
#include <random>
#include <array>
#include <unordered_map>
#include <functional>
#include <complex>

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long MAX = 5100000;
const long long INF = 1LL << 60;
const long long mod = 1000000007LL;
//const long long mod = 998244353LL;

using namespace std;
typedef unsigned long long ull;
typedef long long ll;

ll solve(ll n, vector<int>& h) {
	stack<pair<int, int>> st;
	vector<ll> left(n);
	for (ll i = 0; i < n; i++) {
		ll cnt = 1;
		while (!st.empty() && st.top().first >= h[i]) {
			cnt += st.top().second;
			st.pop();
		}
		left[i] = cnt;
		st.emplace(h[i], cnt);
	}
	while (!st.empty()) st.pop();
	vector<ll> right(n);
	for (ll i = n - 1; i >= 0; i--) {
		ll cnt = 1;
		while (!st.empty() && st.top().first >= h[i]) {
			cnt += st.top().second;
			st.pop();
		}
		right[i] = cnt;
		st.emplace(h[i], cnt);
	}
	ll res = 0;
	for (ll i = 0; i < n; i++) {
		ll cnt = left[i] + right[i] - 1;
		chmax(res, h[i] * cnt);
	}
	return res;
}

int main()
{
	/*
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	*/
	ll H, W; scanf("%lld %lld", &H, &W);
	vector<vector<int>> vs(H, vector<int>(W)); for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) scanf("%d", &vs[i][j]);
	vector<vector<int>> hh(H, vector<int>(W));
	for (int i = 0; i < W; i++) {
		if (vs[0][i]) hh[0][i] = 0;
		else hh[0][i] = 1;
	}
	ll res = 0;
	chmax(res, solve(W, hh[0]));
	for (ll i = 1; i < H; i++) {
		for (ll j = 0; j < W; j++) {
			if (vs[i][j]) hh[i][j] = 0;
			else hh[i][j] = hh[i - 1][j] + 1;
		}
		chmax(res, solve(W, hh[i]));
	}
	cout << res << endl;
	return 0;
}

