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 <iomanip>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <sstream>
#include <string>
#include <utility>
#include <map>
#include <memory>
#include <set>
#include <vector>
#include <deque>
#include <list>
#include <stack>
#include <queue>
#include <array>

using namespace std;

class LRectangle
{
public:
  int h,w;
  vector<vector<int>> t;
  vector<vector<int>> hl;
  LRectangle(){}
  LRectangle( int h, int w ) : h(h), w(w), t(h, vector<int>(w)), hl(h, vector<int>(w+1)) {}
  int solve();
  int maxrec( vector<int> &v );
};

int LRectangle::maxrec( vector<int> &v )
{
  stack<pair<int,int>> st;

  int vs = v.size();
  int ret = 0;
  
  for ( auto i = 0; i < vs; ++i )
    {
      int tidx = i;
      pair<int,int> stt;
      
      while(true)
        {
          if ( st.size() == 0 ) break;

          stt = st.top();

          if ( stt.second <= v[i] ) break;

          ret = max( ret, stt.second * (i - stt.first) );

          tidx = stt.first;
          st.pop();
        }

      if ( st.size() == 0 )
        st.push( make_pair( tidx, v[i] ) );
      else
        {
          stt = st.top();
          if ( stt.second < v[i] )
            st.push( make_pair( tidx, v[i] ) );
        }
    }
  
  return ret;
}

int LRectangle::solve()
{
  int ret = 0;
  
  for ( auto i = 0; i < w; ++i )
    {
      int v = 0;
      for ( auto j = 0; j < h; ++j )
        {
          if ( t[j][i] == 1 )
            {
              hl[j][i] = 0;
              v = 0;
            }
          else
            {
              hl[j][i] = ++v;
            }
        }
    }

  for ( auto i = 0; i < h; ++i )
    hl[i][w] = 0;


  for ( auto i = 0; i < h; ++i )
    ret = max( ret, maxrec( hl[i] ) );
  
  cout << ret << endl;
  
  return 0;
}

int main()
{
  int h, w;
  cin >> h >> w;

  LRectangle lr( h, w );

  for ( auto i = 0; i < h; ++i )
    for ( auto j = 0; j < w; ++j )
      cin >> lr.t[i][j];
  
  lr.solve();

  return 0;
}