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
//Largest Rectangle
#include<bits/stdc++.h>
using namespace std;

int H, W;
int mp[1400][1400];
int h[1400][1400];

//i?????????????????????????????°??????????????§????????¢?????§??????????±???????
int max_rect(int i){
  stack< pair<int, int> > st;
  int ret=0;
  for(int j=0; j<W; j++){
    //?????????????????? ???????????? ???????????????????????????????´????????????????????????????
    if(st.empty() || st.top().second<h[i][j]){
      st.push(make_pair(j, h[i][j]));
      continue;
    }

    //???????????????????????????????´????????????????????????????
    if(st.top().second>h[i][j]){
      int most_left=j;
      while(!st.empty() && st.top().second>=h[i][j]){
	pair<int, int> tmp = st.top();
	st.pop();
	ret=max(ret, (tmp.second * (j-tmp.first))); //??¢????¨????
	most_left=tmp.first; //???????????´?????????x??§?¨??????????
      }
      st.push(make_pair(most_left, h[i][j]));
    }
  }

  while(!st.empty()){
    pair<int, int> tmp=st.top();
    st.pop();

    ret=max(ret, (W-tmp.first)*tmp.second);
  }

  return ret;
}

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

  //???????????????????????¨??????????????????????±???????
  //1??????
  for(int i=0; i<W; i++){
    if(mp[0][i] == 1){h[0][i] = 0;}
    else{h[0][i] = 1;}
  }
  //2????????\???
  for(int i=1; i<H; i++){
    for(int j=0; j<W; j++){
      if(mp[i][j]==1){h[i][j] = 0;}
      else{h[i][j] = h[i-1][j]+1;}
    }
  }

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