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

int H,W;
int c[1500][1500];
int h[1500][1500];
int l[1500];
int r[1500];
int main() {
  scanf("%d%d", &H, &W);
  for(int i=0;i<H;++i)
    for(int j=0;j<W;++j)
      scanf("%d", &c[i][j]);
  for(int i=0;i<H;++i) {
    for(int j=0;j<W;++j) {
      if (c[i][j] == 1) {
        h[i][j] = 0;
      } else if (i==0 || c[i-1][j] == 1) {
        h[i][j] = 1;
      } else {
        h[i][j] = h[i-1][j] + 1;
      }
    }
  }
  
  long long answer = 0;
  for(int i=0;i<H;++i) {
    stack<int> S;
    for(int j=0;j<W;++j) {
      while(!S.empty() && h[i][S.top()] >= h[i][j]) S.pop();
      if (S.empty()) {
        l[j] = 0;
      } else {
        l[j] = S.top() + 1;
      }
      S.push(j);
    }
    S=stack<int>();
    for(int j=W-1;j>=0;--j) {
      while(!S.empty() && h[i][S.top()] >= h[i][j]) S.pop();
      if (S.empty()) {
        r[j] = W-1;
      } else {
        r[j] = S.top() - 1;
      }
      S.push(j);
    }
    
    for(int j=0;j<W;++j) {
      answer = max(answer, 1ll * h[i][j] * (r[j]- l[j] +1));
    }
  }
  
  printf("%lld\n", answer);
  
  return 0;
}