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 <iostream>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;

struct Node {
   int index, value;
   Node(int index = 0, int value = 0):index(index),value(value){
   }  
};

int calHistrigramArea(const vector<int>& a) {
    deque<Node> dq;
    int ans = 0;
    for (int i = 0; i < a.size(); i++) {
        int e = a[i];
        while (!dq.empty()) {
            if (dq.back().value > e) {
                int v = dq.back().value; dq.pop_back();
                int leftIndex = dq.empty() ? -1 : dq.back().index;
                ans = max(ans, (i - leftIndex - 1) * v);
            } else {
                break;
            }
        }
        dq.push_back(Node(i, e));
    }
    
    int i = a.size();
    while (!dq.empty()) {
        int v = dq.back().value;dq.pop_back();
        int leftIndex = dq.empty() ? -1 : dq.back().index;
        ans = max(ans, (i - leftIndex - 1) * v);
    }
    return ans;
}


int solve(const int n, const int m, const vector<vector<int>>& a) {
    vector<int> dpc(m, 0);
    int best = 0;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (a[i][j] == 1) {
                dpc[j] = 0;
            }
            else {
                dpc[j]++;
            }
        }
        best = max(best, calHistrigramArea(dpc));
    }
    return best;   
}

int main() {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> matrix(n, vector<int>(m));
    
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> matrix[i][j];
        }
    }
    
    int ans = solve(n, m, matrix);
    
    cout << ans << endl;
    
    return 0;
}