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 <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define ALL(obj)   (obj).begin(),(obj).end()

#define debug(var)  do{std::cout << __LINE__ << "> " << #var << ": ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;

ll histogram(vi h, int N) {
	stack<pair<int, int>> st;
	ll res = 0;
	REP(i,N) {
		if (st.empty()) {
			st.push(make_pair(h[i], i));
		} else {
			if (st.top().first < h[i]) {
				st.push(make_pair(h[i], i));
			} else if (st.top().first > h[i]) {
				int last_idx;
				while (!st.empty()) {
					if (st.top().first >= h[i]) {
						auto _top = st.top(); st.pop();
						res = max(res, (ll)_top.first * (i - _top.second));
						last_idx = _top.second;
					} else break;
				}
				st.push(make_pair(h[i], last_idx));
			}
		}
	}
	return res;
}

void Main() {
	int H, W; cin >> H >> W;
	vvi c(H, vi(W));
	REP(i,H) REP(j,W) {
		cin >> c[i][j];
	}
	vvi h(H, vi(W + 1));
	REP(i,H) REP(j,W + 1) {
		if (j == W) {
			h[i][j] = 0;
			continue;
		}
		if (c[i][j] == 1) {
			h[i][j] = 0;
			continue;
		}
		if (i == 0) {
			h[i][j] = 1;
			continue;
		}
		h[i][j] = h[i - 1][j] + 1;
	}
	long long res = 0;
	REP(i,H) {
		res = max(res, histogram(h[i], W + 1));
	}
	cout << res << endl;
}

int main() {
    cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
}

