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<cstdio>
#include<stack>
#include<iostream>
using namespace std;
int H, W; int maxv = 0;
int c[1400][1400], t[1400][1400];
struct Rect
{
  int pos, height;
  Rect() {}
  Rect(int pos, int height): pos(pos), height(height) {}
};

void solve()
{
  stack<Rect> S;
  for(int h=0; h<H; h++)
  {
    t[h][W] = 0;
    for(int w=0; w<=W; w++)
    {
      Rect rec = Rect(w, t[h][w]);
      Rect r;
      if(t[h][w] == 0)
      {
        while(!S.empty())
        {
          r = S.top(); S.pop();
          int width = w-r.pos;
          int area = width*r.height;
          maxv = max(maxv, area);
        }
      }
      else
      {
        if(S.empty()) {S.push(rec); continue;}
        if(S.top().height < rec.height) {S.push(rec); continue;}
        if(S.top().height > rec.height)
        { int target = w;
          while(!S.empty() && S.top().height >= rec.height)
          {
            r = S.top(); S.pop();
            int width = w-r.pos;
            int area = width*r.height;
            target = r.pos;
            maxv = max(maxv, area);
          }
          rec.pos = target;
          S.push(rec);
        }
      }
    }
    while(!S.empty())
      S.pop();
  }
  printf("%d\n", maxv);
}

int main()
{
  scanf("%d%d", &H, &W);
  for(int i=0; i<H; i++)
  {
    for(int j=0; j<W; j++)
    {
      scanf("%d", &c[i][j]);
    }
  }
  for(int j=0; j<W; j++)
  {
    if(c[0][j] == 0)
      t[0][j] = 1;
    else t[0][j] = 0;
  }
  for(int i=1; i<H; i++)
  {
    for(int j=0; j<W; j++)
    {
      if(c[i][j] == 1)
        t[i][j] =0;
      else
      {
        t[i][j] = t[i-1][j] + 1;
      }
    }
  }
  solve();

  return 0;
}

