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 <algorithm>
#include <stack>
using namespace std;

static const int MAX_N = 1400;

struct Rectangle {
  int height;
  int pos;
};

int masu[MAX_N][MAX_N];

int main(void) {
  int H, W;
  cin >> H >> W;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> masu[i][j];
      masu[i][j] = (masu[i][j] + 1) % 2;
    }
  }
  for (int i = 1; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (masu[i][j]) {
        masu[i][j] += masu[i-1][j];
      }
    }
  }

  Rectangle rect;
  int maxArea = 0;
  for (int i = 0; i < H; i++) {
    stack<Rectangle> stk;
    for (int j = 0; j < W; j++) {
      rect.height = masu[i][j];
      rect.pos = j;
      if (stk.empty()) {
        stk.push(rect);
      } else {
        if (stk.top().height < rect.height) {
          stk.push(rect);
        } else if (stk.top().height > rect.height) {
          int target = j;
          while (!stk.empty() && stk.top().height >= rect.height) {
            Rectangle pre = stk.top(); stk.pop();
            int area = pre.height * (j - pre.pos);
            maxArea = max(maxArea, area);
            target = pre.pos;
          }
          rect.pos = target;
          stk.push(rect);
        }
      }
    }

    while (!stk.empty()) {
      Rectangle pre = stk.top(); stk.pop();
      int area = pre.height * (W - pre.pos);
      maxArea = max(maxArea, area);
    }
  }

  cout << maxArea << endl;

  return 0;
}