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>

#define EPS (1e-10)
#define rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = b - 1; i >= (int)(a); --i)

using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vd = vector<double>;
using vvi = vector<vi>;

constexpr int MOD = 1000000007;

int get_leargest_rectangle(const vvi& grid) {
    int h = grid.size(), w = grid[0].size();

    // O(hw)
    vvi tile(h, vi(w + 1, 0));
    rep(i, 0, h) {
        rep(j, 0, w) {
            if (grid[i][j] == 1) {
                tile[i][j] = 0;
            } else {
                tile[i][j] = (i > 0 ? tile[i - 1][j] + 1 : 1);
            }
        }
    }

    int maxv = 0;
    rep(i, 0, h) {
        stack<pair<int, int>> S;

        rep(j, 0, w + 1) {
            // height, pos
            pair<int, int> rect = make_pair(tile[i][j], j);

            if (S.empty()) {
                S.push(rect);
            } else {
                if (S.top().first < rect.first) {
                    S.push(rect);
                } else if (S.top().first > rect.first) {
                    int xpos = i;
                    while (!S.empty() && S.top().first >= rect.first) {
                        pair<int, int> top = S.top();
                        S.pop();
                        xpos = top.second;
                        maxv = max(maxv, top.first * (rect.second - xpos));
                    }
                    rect.second = xpos;
                    S.push(rect);
                }
            }
        }
    }
    return maxv;
}

int main() {
    int h, w;
    scanf("%d %d", &h, &w);

    vvi grid(h, vi(w, 0));
    rep(i, 0, h) {
        rep(j, 0, w) { scanf("%d", &grid[i][j]); }
    }

    cout << get_leargest_rectangle(grid) << endl;
    return 0;
}
