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<utility>
#include<stack>
#include<algorithm>
using namespace std;
typedef pair<int,int> rectangle;
int h,w,max_measure,c[1400][1400];
int hist[1400][1400];


void gethist(){
    for(int j=0;j<w;++j){
        for(int i=0;i<h;++i){
            if(c[i][j]==0 && i>0){
                hist[i][j]=1+hist[i-1][j];
            }
            if(i==0){
                hist[i][j]=1-c[i][j];
            }
        }
    }
}

int dp_along_row(int size,int buffer[]){
    
    stack<rectangle> S;
    int max_v=0;
    buffer[size]=0; //likely to cause seg fault

    for(int i=0;i<=size;++i){
        
        rectangle rect;
        rect.first=buffer[i];
        rect.second=i;

        if(S.empty()){
            S.push(rect);
        }
        else{
            if(S.top().first<rect.first){
                S.push(rect);
            }
            else if(S.top().first>rect.first){
                
                int target=i;
                
                while(!S.empty() && S.top().first>=rect.first){
                    rectangle pre=S.top(); S.pop();
                    int area=pre.first*(i-pre.second);
                    max_v=max(max_v,area);
                    target=pre.second;
                }
                
                rect.second=target;
                S.push(rect);
            }
        }
    }

    return max_v;
}

int advanced_dp(){

    gethist();

    int max_v=0;
    for(int i=0;i<h;++i){
        max_v=max(max_v,dp_along_row(w,hist[i]));
    }
    return max_v;
}

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

    cout<<advanced_dp()<<endl;

}
