Problem: We have a board with an H \times W grid. Each square in the grid is painted in black or white. The square at the i-th row from the top and j-th column from the left is black if the j-th character in S_i is `#`, and white if that character is `.`.

Snuke can perform the following operation on the grid any number of times:

* Select a row or column in the grid, and invert the color of all the squares in that row or column (that is, black squares become white and vice versa).



Then, Snuke draws a rectangle along grid lines. Here, all the squares contained in the rectangle must be painted in black.

Find the maximum possible area of Snuke's rectangle when the operation is performed optimally.

Constraints

* 2 \leq H \leq 2000
* 2 \leq W \leq 2000
* |S_i| = W
* S_i consists of `#` and `.`.

Input

Input is given from Standard Input in the following format:


H W
S_1
S_2
:
S_H


Output

Print the maximum possible area of Snuke's rectangle.

Examples

Input

3 3
..#
##.
.#.


Output

6


Input

3 3
..#
.
.#.


Output

6


Input

4 4
....
....
....
....


Output

16


Input

10 8
...#.#
...#.#
..###.#.
.##.#.#
.#..#.#.
..##.#.#
.#.#..
...#.#..
.#.##
..###


Output

27

Solution (in CPP):

Solution:
// lydsy 1057 modified
#include <bits/stdc++.h>

const int N = 2054;
typedef int mat[N][N];

int r, c;
mat a, f, g;
char map[N][N];

inline void up(int &x, const int y) {x < y ? x = y : 0;}
inline void down(int &x, const int y) {x > y ? x = y : 0;}
inline int max(const int x, const int y) {return x < y ? y : x;}

int work() {
    int i, j, u, d, la, ans = max(r, c) + 1;
    int *U, *D, *A;
    for(j = 1; j <= c; ++j){
        for(i = 1; i <= r; ++i)
            f[i][j] = (a[i][j] ? 0 : f[i - 1][j] + 1);
        for(i = r; i > 0; --i)
            g[i][j] = (a[i][j] ? 0 : g[i + 1][j] + 1);
    }
    for(i = 1; i <= r; ++i){
        U = f[i]; D = g[i]; A = a[i];
        la = 0; u = i - U[1]; d = i + D[1];
        up(ans, 2 * (d - u));
        for(j = 2; j <= c; ++j){
            if(A[j] == A[j - 1]){
                up(u, i - U[j]); down(d, i + D[j]);
            }else{
            	la = j - 1; u = i - U[j]; d = i + D[j];
			}
			up(ans, (d - u) * (j - la + 1));
		}
	}
	return printf("%d\n", ans), 0;
}

int main() {
	int i, j;
	scanf("%d%d", &r, &c), --r, --c;
	for (i = 0; i <= r; ++i) scanf("%s", map[i]);
	for (i = 1; i <= r; ++i)
		for (j = 1; j <= c; ++j)
			a[i][j] = (map[i][j] ^ map[i][j - 1] ^ map[i - 1][j] ^ map[i - 1][j - 1]) & 1;
	return work();
}