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;
const int MAX_N = 1400;
int a[MAX_N][MAX_N];
int t[MAX_N][MAX_N];
deque<pair<int, int> > deq;
int main() {
  int h, w;
  cin >> h >> w;
  int ans = 0;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  for (int i = 0; i < h; i++) {
    t[i][w] = 0;
  }
  for (int j = 0; j < w; j++) {
    t[0][j] = 1 ^ a[0][j];
  }
  for (int i = 1; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (a[i][j] == 0) {
        t[i][j] = t[i - 1][j] + 1;
      } else {
        t[i][j] = 0;
      }
    }
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      cout << t[i][j] << " ";
    }
    cout << "\n";
  }
  int pos;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w + 1; j++) {
      if (deq.empty()) {
        deq.push_back(pair<int, int>(t[i][j], j));
        continue;
      }
      deque<pair<int, int> >::iterator it = deq.end() - 1;
      if ((*it).first < t[i][j]) {
        deq.push_back(pair<int, int>(t[i][j], j));
      } else if ((*it).first > t[i][j]) {
        while (!deq.empty() && (*it).first > t[i][j]) {
          int S = (*it).first * (j - (*it).second);
          pos = (*it).second;
          ans = max(S, ans);
          deq.pop_back();
          it = deq.end() - 1;
        }
        deq.push_back(pair<int, int>(t[i][j], pos));
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
