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 <stack>

using namespace std;

int H,W;
int c[1402][1402];
int h[1402][1402];

void prepare() {
  for (int i = 1; i <= H; ++i) {
    for (int j = 1; j <= W; ++j) {
      h[i][j] = (c[i][j] + h[i-1][j])*c[i][j];
    }
  }
}

int solve_sub(int i) {
  int ans = 0;
  int last_j;
  stack<pair<int, int>> s;
  pair<int, int> tmp;
  for (int j = 1; j <= W+1; ++j) {
    if (s.empty() || (s.top().second < h[i][j])) {
      s.push(make_pair(j, h[i][j]));
    }
    else {
      while (!s.empty() && s.top().second >= h[i][j]) {
        last_j = s.top().first;
        ans = max(ans, (j-last_j)*(s.top().second));
        s.pop();
      }
      s.push(make_pair(last_j, h[i][j]));
    }
  }
  return ans;
}

int solve() {
  int ans = 0;
  for (int i = 1; i <= H; ++i) {
    ans = max(ans, solve_sub(i));
  }
  return ans;
}

int main () {
  cin>>H>>W;
  for (int i = 0; i < H; ++i) {
    for (int j = 0; j < W; ++j) {
      cin>>c[i+1][j+1];
      c[i+1][j+1] ^= 1;
    }
  }
  prepare();
  cout<<solve()<<endl;
}

