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 long long mod = 1000000000 + 7;
const long long hmod1 = 999999937;
const long long hmod2 = 1000000000 + 9;
const long long INF = 1 << 30;
const int dx4[4] = {1, 0, -1, 0};
const int dy4[4] = {0, 1, 0, -1};
const int dx8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
const int dy8[8] = {0, 1, -1, 1, -1, 0, 1, -1};
const double pi = 3.141592653589793;
int h, w;
vector<vector<int>> grid(1005, vector<int>(1005));
struct Rectangle {
  int height, pos;
};
int largest_hist(int size, vector<int> &hist) {
  stack<Rectangle> s;
  int maxv = 0;
  hist[size] = 0;
  for (int i = 0; i <= size; i++) {
    Rectangle rect;
    rect.height = hist[i];
    rect.pos = i;
    if (s.empty()) {
      s.push(rect);
    } else {
      if (s.top().height < rect.height)
        s.push(rect);
      else if (s.top().height > rect.height) {
        int target = i;
        while (!s.empty() && s.top().height >= rect.height) {
          Rectangle pre = s.top();
          s.pop();
          int area = pre.height * (i - pre.pos);
          maxv = max(maxv, area);
          target = pre.pos;
        }
        rect.pos = target;
        s.push(rect);
      }
    }
  }
  return maxv;
}
int largest_rect(int h, int w, vector<vector<int>> &grid) {
  vector<vector<int>> hist(h, vector<int>(w + 1));
  for (int j = 0; j < w; j++) {
    for (int i = 0; i < h; i++) {
      if (grid[i][j] == 1) {
        hist[i][j] = 0;
      } else {
        hist[i][j] = (i > 0) ? hist[i - 1][j] + 1 : 1;
      }
    }
  }
  int ret = 0;
  for (int i = 0; i < h; i++) {
    ret = max(ret, largest_hist(w, hist[i]));
  }
  return ret;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> h >> w;
  for (int i = 0; i < (h); i++)
    for (int j = 0; j < (w); j++) cin >> grid[i][j];
  cout << largest_rect(h, w, grid) << endl;
}
