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
/*
 * Given an H*W-sized, 0/1-valued matrix, find the area of the largest
 * rectangle containing only 0s.
 *
 * 1 <= H, W <= 1400
 */

#include <algorithm>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;

int m[1400][1400];

int main() {
  int h, w;
  cin >> h >> w;
  int A{0};
  for (int i = 0; i < h; ++i)
    for (int j = 0; j < w; ++j)
      cin >> m[i][j];
  vector<int> d(w, -1), l(w), r(w);
  for (int i = 0; i < h; ++i) {
    for (int j = 0; j < w; ++j)
      if (m[i][j])
        d[j] = i;
    stack<int> st;
    for (int j = 0; j < w; ++j) {
      while (!st.empty() && d[st.top()] <= d[j])
        st.pop();
      l[j] = st.empty() ? -1 : st.top();
      st.push(j);
    }
    while (!st.empty())
      st.pop();
    for (int j = w - 1; j >= 0; --j) {
      while (!st.empty() && d[st.top()] <= d[j])
        st.pop();
      r[j] = st.empty() ? w : st.top();
      st.push(j);
    }
    for (int j = 0; j < w; ++j)
      A = max(A, (i - d[j]) * (r[j] - l[j] - 1));
  }
  cout << A << endl;
}

