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 <iostream>
#include <stack>

using namespace std;

struct Rectangle {int height, pos;};

int main() {
  int h, w;
  cin >> h >> w;
  int C[w][h], R[w+1][h];
  for (int j = 0; j < h; j++) {
      for (int i = 0; i < w; i++) {
      cin >> C[i][j];
    }
  }
  for (int j = 0; j < h; j++) {
    for (int i = 0; i < w; i++) {
      if (!j) {
        R[i][j] = (C[i][j]+1) % 2;
      } else {
        R[i][j] = (!C[i][j] ? R[i][j-1] + 1: 0);
      }
    }
    R[w][j] = 0;
  }
  int max_area = 0;
  for (int j = 0; j < h; j++) {
    stack<Rectangle> s;
    for (int i = 0; i <= w; i++) {
      Rectangle rect;
      rect.height = R[i][j];
      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 = rect.pos;
          while (!s.empty() && s.top().height >= rect.height) {
            Rectangle pre_rect = s.top(); s.pop();
            max_area = max(max_area, pre_rect.height * (i - pre_rect.pos));
            target = pre_rect.pos;
          }
          rect.pos = target;
          s.push(rect);
        }
      }
    }
  }
  cout << max_area << endl;
  return 0;
}

