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 <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cmath>
#include <deque>
#include <iterator>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
#define MAX 1400
template<class T> inline bool chmax(T& a, T b) {if (a<b) {a=b; return true;} return false;}
template<class T> inline bool chmin(T& a, T b) {if (a>b) {a=b; return true;} return false;}

struct Rectangle{ll height; ll pos;};

ll getLargestRectangle(ll size, vll buffer) {
  stack<Rectangle> S;
  ll maxv = 0;
  buffer[size] = 0;

  REP(i, size+1) {
    Rectangle rect;
    rect.height = buffer[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 H, W;
vvll buffer(MAX, vll(MAX));
vvll T(MAX, vll(MAX));

ll getLargestRectangle() {
  REP(j, W) {
    REP(i, H) {
      if (buffer[i][j]) {
        T[i][j] = 0;
      } else {
        T[i][j] = (i>0) ? T[i-1][j] + 1: 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;
  return 0;
}

