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 SIZE 300005
#define MOD 1000000007LL
#define INF 1 << 29
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
typedef complex<double> dcomplex;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cerr<<a[i]<<((i==a.size()-1)?"\n":" ");}}
ll gcd(ll a,ll b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
ll lcm(ll a,ll b){return a==0||b==0?0:a*b/gcd(a,b);}
ll fact(ll a){ll b=1;FOR(i,1,a)b*=i;return b;}

struct Rect {int h; int pos;};

int solve(vector<int> v)
{
  stack<Rect> S;
  v.push_back(0);
  int ans = 0;
  FOR(i,0,v.size())
  {
    Rect rect;
    rect.h = v[i];
    rect.pos = i;
    if(S.empty()) S.push(rect);
    else
    {
      if(S.top().h < rect.h) S.push(rect);
      else if(S.top().h > rect.h)
      {
        int t = i;
        while(!S.empty() && S.top().h >= rect.h)
        {
          Rect pre = S.top(); S.pop();
          int area = pre.h * (i-pre.pos);
          ans = max(ans,area);
          t = pre.pos;
        }
        rect.pos = t;
        S.push(rect);
      }
    }
  }
  return ans;
}

int main()
{
  int ans = 0;
  int h,w; cin>>h>>w;
  vector<vector<int> > T(h,vector<int>(w,0));
  vector<vector<int> > U(h,vector<int>(w,0));
  REP(i,h) REP(j,w)
  {
    int t; cin >> t;
    T[i][j] = (t+1)%2;
  }
  REP(i,w) U[0][i] = T[0][i];
  FOR(i,1,h-1) REP(j,w) U[i][j] = T[i][j] ? U[i-1][j]+1 : 0;
  REP(i,h) ans = max(ans,solve(U[i]));
  cout << ans << endl;
  return 0;
}