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 <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <stack>
#define MOD 1000000007
typedef long long ll;
using namespace std;

int H,W;
int c[1410][1410];

int dp[1410][1410];

void preset(){
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(c[i][j]==1) dp[i][j]=0;
            else{
                if(i>0) dp[i][j]+=dp[i-1][j];
                dp[i][j]++;
            }
        }
    }
}

int getLargestRectangle(int height){
    int res=0;
    dp[height][W]=0;
    stack<pair<int,int>> ST;

    for(int j=0;j<=W;j++){
        if(ST.empty()) ST.push(make_pair(dp[height][j],j));
        else{
            pair<int,int> tp=ST.top();
            int h=tp.first;
            if(h==dp[height][j]) continue;
            else if(h<dp[height][j]){
                ST.push(make_pair(dp[height][j],j));
            }else{
                int target=j;
                while(ST.size()&&ST.top().first>=dp[height][j]){
                    pair<int,int> tp=ST.top();
                    int h=tp.first;
                    ST.pop();
                    res=max(res,h*(j-tp.second));
                    target=tp.second;
                }
                ST.push(make_pair(dp[height][j],target));
            }
        }
    }
    return res;
}

int main(){
  cin>>H>>W;
  for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
          cin>>c[i][j];
      }
  }

  preset();

  int ans=0;
  for(int i=0;i<H;i++){
      ans=max(ans,getLargestRectangle(i));
  }
  cout<<ans<<endl;

  return 0;
}

