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;
struct rect {
  int left, height;
  rect(int l, int h) {
    left = l;
    height = h;
  }
};
int solve(vector<int>& hist) {
  hist.push_back(0);
  int W = hist.size();
  int ans = 0;
  stack<rect> st;
  for (int i = 0; i < W; i++) {
    if (st.empty()) {
      st.push(rect(i, hist[i]));
    } else {
      rect max_h = st.top();
      if (max_h.height < hist[i]) {
        st.push(rect(i, hist[i]));
      } else if (max_h.height > hist[i]) {
        while (!st.empty() and max_h.height >= hist[i]) {
          ans = max(ans, max_h.height * (i - max_h.left));
          st.pop();
        }
        st.push(rect(max_h.left, hist[i]));
      }
    }
  }
  return ans;
}
int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<int> > m(H + 1, vector<int>(W, 0));
  for (int i = 1; i <= H; i++)
    for (int j = 0; j < W; j++) cin >> m[i][j];
  vector<vector<int> > dp(H + 1, vector<int>(W, 0));
  for (int i = 1; i <= H; i++) {
    for (int j = 0; j < W; j++) {
      if (m[i][j] == 1)
        dp[i][j] = 0;
      else
        dp[i][j] = dp[i - 1][j] + 1;
    }
  }
  int ans = 0;
  for (int i = 1; i <= H; i++) ans = max(ans, solve(dp[i]));
  cout << ans << endl;
}
