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>

using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 29;

int H,W;
int c[1500][1500];
int h[1500][1500];
int l[1500],r[1500];

int main(void){
	cin >> H >> W;
	rep(i,H)rep(j,W) cin >> c[i][j];
	rep(i,H)rep(j,W){
		if(c[i][j]==1)
			h[i][j]=0;
		else{
			h[i][j]=1;
			if(i-1>=0) h[i][j]+=h[i-1][j];
		}
	}
	int ans=0;
	rep(i,H){
		stack<int> stk;
		rep(j,W){
			while(!stk.empty()&&h[i][stk.top()]>=h[i][j]) stk.pop();
			l[j]=(stk.size()==0)?0:(stk.top()+1);
			stk.push(j);
		}
		while(!stk.empty()) stk.pop();
		for(int j=W-1;j>=0;--j){
			while(!stk.empty()&&h[i][stk.top()]>=h[i][j]) stk.pop();
			r[j]=(stk.size()==0)?W:(stk.top());
			stk.push(j);
		}
		rep(j,W) ans=max(ans,(r[j]-l[j])*h[i][j]);
	}

	cout << ans << endl;
	return 0;
}