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;
int c[1401][1401];
int dp[1401][1401];
struct rt {
  int point;
  int height;
};
int max_in_x(int *l, int w) {
  stack<rt> st;
  int cur = 0;
  int sum = 0;
  while (cur < w || !st.empty()) {
    int next_height = 0;
    if (cur < w) {
      int current_height = *(l + cur);
      if (st.empty() || st.top().height < current_height) {
        rt a;
        a.point = cur;
        a.height = current_height;
        st.push(a);
        cur++;
        continue;
      }
      if (st.top().height == current_height) {
        cur++;
        continue;
      }
      if (st.top().point != cur - 1) {
        rt a;
        a.point = cur - 1;
        a.height = *(l + cur - 1);
        st.push(a);
      }
      next_height = *(l + cur);
    } else {
      if (st.top().point != w - 1) {
        rt a;
        a.point = w - 1;
        a.height = *(l + w - 1);
        st.push(a);
      }
    }
    rt start = st.top();
    rt current;
    while (!st.empty()) {
      current = st.top();
      st.pop();
      if (current.height < next_height) {
        current.height = next_height;
        current.point++;
        st.push(current);
        break;
      }
      sum = max(sum, (start.point - current.point + 1) * current.height);
    }
  }
  return sum;
}
int main() {
  int W, H;
  cin >> H >> W;
  int v_max = 0;
  for (int y = 0; y < H; y++) {
    for (int x = 0; x < W; x++) {
      cin >> c[y][x];
      c[y][x] ^= 1;
      dp[y][x] = 0;
    }
  }
  for (int x = 0; x < W; x++) {
    for (int y = 0; y < H; y++) {
      if (c[y][x] == 0) {
        dp[y][x] = 0;
        continue;
      }
      if (y == 0) {
        dp[y][x] = 1;
        continue;
      }
      dp[y][x] = dp[y - 1][x] + 1;
    }
  }
  int s_max = 0;
  for (int y = 0; y < H; y++) {
    int ret = max_in_x(dp[y], W);
    s_max = max(s_max, ret);
  }
  cout << s_max << endl;
  return 0;
}
