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>
#define MAX 1400
using namespace std;
int H, W, hSum[MAX+1][MAX+2];

int main(){
  cin >> H >> W;

  for ( int j = 1; j <= W; j++){hSum[0][j] = 0;}
  for ( int j = 1; j <= H;j++){hSum[j][0] = hSum[j][W+1] = 0;}

  int a;
  for ( int i = 1; i <= H; i++){
    for ( int j = 1; j <= W; j++){
      cin >> a;
      if ( a == 1){ hSum[i][j] = 0;}
      else { hSum[i][j] = hSum[i-1][j] + 1;}
    }
  }

  int maxV = 0;
  stack<pair<int, int> > S;
  for ( int i = 1; i <= H; i++){
    for ( int j = 1; j <= W+1; j++){
      if ( j == 1 || hSum[i][j-1] <= hSum[i][j]) S.push(make_pair(j, hSum[i][j]));
      else {
        int pos = j;
        while ( !S.empty() && S.top().second >= hSum[i][j]){
          pair<int, int> top = S.top(); S.pop();
          int area = top.second * ( j - top.first);
          maxV = max(maxV, area);
          pos = top.first;
        }
        S.push(make_pair(pos, hSum[i][j]));
      }
    }
  }

  cout << maxV << endl;

  return 0;
}
