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;
using ll = long long;
using ull = unsigned long long;
//#define ll long long
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
#define rep(i, n) REP(i, 0, n)
#define rep_rev(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define all(x) (x).begin(),(x).end()
ll t1,t2,t3;
const ll mod = 998244353;
const int INF = 1e9;
const ll INFLONG = 1e18;


ll h,w;
vector<vector<ll>> buffer(1400,vector<ll>(1400,0));
vector<vector<ll>> T(1400,vector<ll>(1400,0));
struct Rectangle{
    ll height;
    ll pos;
};

ll getLargestRectangle(ll size,vector<ll> vec){
  stack<Rectangle>  S;
  ll maxv = 0;
  vec[size] = 0;
  rep(i,size+1){
    Rectangle rect;
    rect.height = vec[i];
    rect.pos = i;
    if(S.empty()){
      S.push(rect);
    }else{
      if(S.top().height < rect.height){
        S.push(rect);
      }else if(S.top().height > rect.height){
        ll target = i;
        while(!S.empty() && S.top().height >= rect.height){
          Rectangle pre = S.top();
          S.pop();
          ll area = pre.height * (i-pre.pos);
          chmax(maxv,area);
          target = pre.pos;
        }
        rect.pos = target;
        S.push(rect);
      }
    }
  }
  return maxv;
}
ll getLargestRectangle(){
  rep(i,h){
    rep(j,w){
      if(buffer[i][j]){
        T[i][j] = 0;
      }else{
        if(i > 0){
          T[i][j] = T[i-1][j] + 1;
        }else{
          T[i][j] = 1;
        }
      }
    }
  }

  ll maxv = 0;
  rep(i,h){
    chmax(maxv,getLargestRectangle(w,T[i]));
  }

  return maxv;
}

int main(){
  cin >> h >> w;
  rep(i,h){
    rep(j,w){
      cin >> buffer[i][j];
    }
  }
  cout << getLargestRectangle() << endl;
}
