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>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T>
using Table = vector<vector<T>>;
const ld eps = 1e-9;
const int adx[] = {1, 1, 1, 0, -1, -1, -1, 0};
const int ady[] = {1, 0, -1, -1, -1, 0, 1, 1};
int add(const int base, const int plus) {
  if (!plus) {
    return base + 1;
  } else {
    return 0;
  }
}
vector<vector<vector<int>>> get_cumulative_sum(
    const vector<vector<int>>& field) {
  const int H = field.size();
  const int W = field[0].size();
  vector<vector<vector<int>>> sums(4, vector<vector<int>>(H, vector<int>(W)));
  for (int ny = H - 1; ny >= 0; --ny) {
    for (int nx = 0; nx < W; ++nx) {
      for (int k = 0; k < 3; ++k) {
        sums[k].clear();
      }
      for (int k = 3; k < 4; ++k) {
        int py = ny - ady[k];
        int px = nx - adx[k];
        if (!(px >= 0 && px < W && py >= 0 && py < H)) continue;
        sums[k][ny][nx] = add(sums[k][py][px], field[ny][nx]);
      }
    }
  }
  return sums;
}
int getans(vector<int> hs) {
  hs.emplace_back(0);
  stack<pair<int, int>> que;
  que.emplace(-1, 0);
  int ans = 0;
  for (int x = 0; x < hs.size(); ++x) {
    if (que.empty()) {
      que.push(make_pair(x, hs[x]));
    } else {
      while (!que.empty()) {
        auto p = que.top();
        if (p.second < hs[x]) {
          que.push(make_pair(x, hs[x]));
          break;
        } else if (p.second == hs[x]) {
          break;
        } else {
          int area = (x - p.first) * p.second;
          ans = max(ans, area);
          que.pop();
          if (!que.empty()) {
            auto np = que.top();
            if (np.second < hs[x]) {
              que.push(make_pair(p.first, hs[x]));
              break;
            }
          }
        }
      }
    }
  }
  return ans;
}
int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<int>> field(H + 2, vector<int>(W + 2, 1));
  for (int i = 0; i < H; ++i) {
    for (int j = 0; j < W; ++j) {
      cin >> field[i + 1][j + 1];
    }
  }
  auto vs = get_cumulative_sum(field);
  int ans = 0;
  for (int y = 1; y <= H; ++y) {
    vector<int> v;
    for (int x = 1; x <= W; ++x) {
      v.push_back(vs[y][x][3]);
    }
    ans = max(ans, getans(v));
  }
  cout << ans << endl;
  return 0;
}
