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 <algorithm>
#include <iostream>
#include <vector>
#include <stack>
using namespace std;

template <typename T>
long long largest_rectangle_hist(vector<T> &height) {
    stack<int> st;
    height.emplace_back(0);
    vector<int> left(height.size());
    long long ret = 0;
    for (int i = 0; i < height.size(); i++) {
        while (!st.empty() && height[st.top()] >= height[i]) {
            ret = max(ret, 1LL * (i - left[st.top()]) * height[st.top()]);
            st.pop();
        }
        left[i] = st.empty() ? 0 : st.top() + 1;
        st.emplace(i);
    }
    return ret;
}

int main() {
    int H, W; cin >> H >> W;
    vector<vector<int>> c(H, vector<int>(W));
    for (auto &ci: c) for (auto &cij: ci) cin >> cij;
    vector<vector<int>> dp(H, vector<int>(W, 0));
    for (int j = 0; j < W; j++) {
        for (int i = 0; i < H; i++) {
            if (c[i][j]) dp[i][j] = 0;
            else dp[i][j] = i ? dp[i - 1][j] + 1 : 1;
        }
    }
    long long ans = 0;
    for (int i = 0; i < H; i++) {
        ans = max(ans, largest_rectangle_hist(dp[i]));
    }
    cout << ans << endl;
    return 0;
}
