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
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;

public class Main{
	static int H, W;
	static final int MAX = 1401;
	static int buffer[][] = new int[MAX][MAX];
	static int T[][] = new int[MAX][MAX];
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		H = scan.nextInt();
		W = scan.nextInt();
		//int[][]buffer = new int[H][W];
		for(int i = 0; i < H; i++) {
			for(int j = 0; j < W; j++) {
				buffer[i][j] = scan.nextInt();
			}
		}
		scan.close();
		System.out.println(getLargestRectangle());
	}
	static int getLargestRectangle(int size, int[] a) {
		Deque<int[]> stack = new ArrayDeque<int[]>();
		int maxv = 0;
		a[size] = 0;
		for(int i = 0; i <= size; i++) {
			int[]rect = {a[i], i};
			if(stack.isEmpty()) {
				stack.push(rect);
			}else {
				if(stack.peek()[0] < rect[0]) {
					stack.push(rect);
				}else if(stack.peek()[0] > rect[0]) {
					int target = i;
					while(!stack.isEmpty() && stack.peek()[0] >= rect[0]) {
						int[]p = stack.pop();
						int area = p[0] * (i - p[1]);
						maxv = Math.max(maxv, area);
						target = p[1];
					}
					rect[1] = target;
					stack.push(rect);
				}
			}
		}
		return maxv;
	}
	static int getLargestRectangle() {
		for(int j = 0; j < W; j++) {
			for(int i = 0; i < H; i++) {
				if(buffer[i][j] == 1) {
					T[i][j] = 0;
				}else {
					if(i > 0) {
						T[i][j] = T[i - 1][j] + 1;
					}else {
						T[i][j] = 1;
					}
				}
			}
		}
		int maxv = 0;
		for(int i = 0; i < H; i++) {
			maxv = Math.max(maxv, getLargestRectangle(W, T[i]));
		}
		return maxv;
	}
}
