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;

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}


int nextInt() { int x; scanf("%d", &x); return x;}
ll nextLong() { ll x; scanf("%lld", &x); return x;}

const int MAX_H = 1410;
const int MAX_W = 1410;
int A[MAX_H][MAX_W];
int B[MAX_H][MAX_W];

ll largestRectangleInHistogram(vector<ll> hist) {
  hist.push_back(0); // 番兵
  vector<pair<int,ll>> stack;
  stack.push_back({-1, 0});
  ll res = 0;
  REP(i, hist.size()) {
    while (stack.back().first != -1 && stack.back().second > hist[i]) {
      auto b = stack.back();
      stack.pop_back();
      auto c = stack.back();
      chmax(res, (i - c.first - 1) * (b.second));
    }
    stack.push_back({i, hist[i]});
  }
  return res;
}

int main2() {
  int H = nextInt();
  int W = nextInt();
  REP(h, H) REP(w, W) A[h][w] = nextInt();

  CLR(B, 0);

  for (int w = 0; w < W; w++) {
    int L = 0;
    for (int h = 0; h < H; h++) {
      if (A[h][w] == 0) {
        L++;
      } else {
        L = 0;
      }
      B[h][w] = L;
    }
  }


  ll ans = 0;
  REP(h, H) {
    vector<ll> hist(W);
    REP(w, W) hist[w] = B[h][w];
    ll val = largestRectangleInHistogram(hist);
    chmax(ans, val);
  }
  cout << ans << endl;
  return 0;
}

int main() {

#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}
