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 = 1401, mod = 1e9 + 7, oo = INT_MAX;
int n, m, a[MAX][MAX], dp[MAX][MAX];
int calc(vector<int> a) {
  vector<pair<int, int> > lim;
  stack<int> s;
  s.push(0);
  lim.push_back({-1, 0});
  for (int i = 1; i < a.size(); ++i) {
    while (!s.empty() && a[s.top()] >= a[i]) s.pop();
    if (s.empty())
      lim.push_back({-1, 0});
    else
      lim.push_back({s.top(), 0});
    s.push(i);
  }
  stack<int> s1;
  s1.push(a.size() - 1);
  lim[a.size() - 1].second = a.size();
  for (int i = a.size() - 2; i >= 0; --i) {
    while (!s1.empty() && a[s1.top()] >= a[i]) s1.pop();
    if (s1.empty())
      lim[i].second = a.size();
    else
      lim[i].second = s1.top();
    s1.push(i);
  }
  int m = 0;
  for (int i = 0; i < lim.size(); ++i) {
    int aux = (lim[i].second - lim[i].first - 1) * a[i];
    if (aux > m) m = aux;
  }
  return m;
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> a[i][j];
    }
  }
  int resp = 0;
  vector<int> aux;
  for (int i = 0; i < m; ++i) {
    if (a[0][i])
      dp[0][i] = 0;
    else
      dp[0][i] = 1;
    aux.push_back(a[0][i]);
  }
  resp = max(calc(aux), resp);
  aux.clear();
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (a[i][j])
        dp[i][j] = 0;
      else
        dp[i][j] = 1 + dp[i - 1][j];
      aux.push_back(dp[i][j]);
    }
    resp = max(calc(aux), resp);
    aux.clear();
  }
  cout << resp << '\n';
  return 0;
}
