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>
using namespace std;

typedef long long ll;
typedef pair<int,int> P;

#define p_ary(ary,a,b,i) do { cout << "["; for (int (i) = (a);(i) < (b);++(i)) cout << ary[(i)] << ((b)-1 == (i) ? "" : ", "); cout << "]\n"; } while(0)
#define p_map(map,it) do {cout << "{";for (auto (it) = map.begin();;++(it)) {if ((it) == map.end()) {cout << "}\n";break;}else cout << "" << (it)->first << "=>" << (it)->second << ", ";}}while(0)

int getLargestRectangle(vector<int>& hight) {
    int w = hight.size(),res = 0;
    stack<P> st;
    for (int i = 0;i < w;++i) {
        if (st.empty()) {
            if (hight[i]) st.push(P(hight[i],i));
        } else {
            int t = st.top().first;
            if (t < hight[i]) st.push(P(hight[i],i));
            else if (t > hight[i]) {
                int l = i;
                while (!st.empty() && hight[i] < st.top().first) {
                    P p = st.top();
                    l = p.second;
                    res = max(res,(p.first)*(i-l));
                    st.pop();
                }
                if (st.empty() || st.top().first < hight[i]) st.push(P(hight[i],l));
            }
        }
    }
    return res;
}

int getLargestRectangle(vector<vector<int>>& grid) {
    int h = grid.size(),w = grid[0].size();
    vector<vector<int>> hight(h,vector<int>(w));
    hight = grid;
    for (int j = 0;j < w;++j) for (int i = 1;i < h;++i) if (hight[i][j]) hight[i][j] += hight[i-1][j];
    for (int i = 0;i < h;++i) hight[i].emplace_back(0);
    int res = 0;
    for (int i = 0;i < h;++i) res = max(res,getLargestRectangle(hight[i]));
    return res;
}

int main() {
    int h,w;
    cin >> h >> w;
    vector<vector<int>> t(h,vector<int>(w));
    for (int i = 0;i < h;++i) for (int j = 0;j < w;++j) {
        int c;
        cin >> c;
        t[i][j] = c^1;
    }
    cout << getLargestRectangle(t) << endl;
    return 0;
}
