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 <bits/stdc++.h>
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
struct po {
  int x, y, is_tile, wall;
};
int main() {
  int H, W;
  cin >> H >> W;
  po dp[1000][1000];
  for (int i = 0; i < (1); i++)
    for (int j = 0; j < (1); j++) {
      dp[i][j].is_tile = 0;
      dp[i][j].x = 0;
      dp[i][j].y = 0;
      dp[i][j].wall = 0;
    }
  for (int i = 0; i < (H); i++)
    for (int j = 0; j < (W); j++) cin >> dp[i + 1][j + 1].is_tile;
  int max_rectangle = 0;
  for (int i = 0; i < (H); i++) {
    for (int j = 0; j < (W); j++) {
      if (dp[i][j].is_tile == 1) {
        if (dp[i][j + 1].y > dp[i + 1][j].x) {
          dp[i + 1][j + 1].y = dp[i][j + 1].y + 1;
          dp[i + 1][j + 1].x = 1;
        } else {
          dp[i + 1][j + 1].x = dp[i + 1][j].x + 1;
          dp[i + 1][j + 1].y = 1;
        }
      } else if (dp[i][j + 1].is_tile == 1) {
        dp[i + 1][j + 1].x = j + 1 - dp[i + 1][0].wall;
        dp[i + 1][j + 1].y = 1;
      } else if (dp[i + 1][j].is_tile == 1) {
        dp[i + 1][j + 1].x = 1;
        dp[i + 1][j + 1].y = i + 1 - dp[0][j + 1].wall;
      } else if ((dp[i + 1][j].is_tile == 1) && (dp[i][j + 1].is_tile == 1)) {
        dp[i + 1][j + 1].x = 1;
        dp[i + 1][j + 1].y = 1;
      } else if (dp[i + 1][j + 1].is_tile == 0) {
        if (dp[i][j].x > dp[i + 1][j].x && dp[i][j].y > dp[i][j + 1].y) {
          dp[i + 1][j + 1].x = dp[i + 1][j].x + 1;
          dp[i + 1][j + 1].y = dp[i][j + 1].y + 1;
        } else if (dp[i + 1][j].x + 1 < dp[i][j + 1].y + 1) {
          if ((dp[i][j].y + 1) * (dp[i][j].x + 1) > dp[i][j + 1].y + 1) {
            dp[i + 1][j + 1].x = dp[i][j].x + 1;
            dp[i + 1][j + 1].y = dp[i][j].y + 1;
          } else {
            dp[i + 1][j + 1].y = dp[i][j + 1].y + 1;
            dp[i + 1][j + 1].x = 1;
          }
        } else {
          if ((dp[i][j].y + 1) * (dp[i][j].x + 1) > dp[i + 1][j].x + 1) {
            dp[i + 1][j + 1].x = dp[i][j].x + 1;
            dp[i + 1][j + 1].y = dp[i][j].y + 1;
          } else {
            dp[i + 1][j + 1].x = dp[i + 1][j].x + 1;
            dp[i + 1][j + 1].y = 1;
          }
        }
      } else {
        dp[i + 1][j + 1].x = 0;
        dp[i + 1][j + 1].y = 0;
        dp[0][j + 1].wall = i + 1;
        dp[i + 1][0].wall = j + 1;
      }
      max_rectangle =
          max(max_rectangle, dp[i + 1][j + 1].x * dp[i + 1][j + 1].y);
    }
  }
  cout << max_rectangle << endl;
  return 0;
}
