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;
int grd[2000][2000];
int main() {
  int h, w;
  cin >> h >> w;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) cin >> grd[i][j];
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (grd[i][j] == 1)
        grd[i][j] = 0;
      else if (i == 0)
        grd[i][j] = 1;
      else
        grd[i][j] = grd[i - 1][j] + 1;
    }
  }
  int ans = 0;
  for (int i = 0; i < h; i++) {
    stack<pair<int, int>> s;
    s.push(make_pair(-1, -1));
    for (int j = 0; j < w; j++) {
      if (grd[i][j] > s.top().first) {
        s.push(make_pair(grd[i][j], j));
      } else if (grd[i][j] == s.top().first) {
        s.pop();
        s.push(make_pair(grd[i][j], j));
      } else {
        while (s.top().first > grd[i][j]) {
          int hh = s.top().first;
          while (hh <= s.top().first) s.pop();
          int ww = s.top().second;
          ans = max(ans, hh * (j - ww - 1));
          s.push(make_pair(s.top().first, j - 1));
        }
        s.push(make_pair(grd[i][j], j));
      }
    }
    while (s.top().first > 0) {
      int hh = s.top().first, we = s.top().second;
      while (hh <= s.top().first) s.pop();
      int ws = s.top().second;
      ans = max(ans, hh * (we - ws));
      int sf = s.top().first;
      s.pop();
      s.push(make_pair(sf, we));
    }
  }
  cout << ans << endl;
  return 0;
}
