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:
#include<bits/stdc++.h>
#define F(i,a,b) for(int i=(a);i<=(b);++i)
#define F2(i,a,b) for(int i=(a);i<(b);++i)
#define dF(i,a,b) for(int i=(a);i>=(b);--i)
#define dF2(i,a,b) for(int i=(a);i>(b);--i)
#define dF3(i,a,b) for(int i=(a)-1;i>=(b);--i)
using namespace std;typedef long long ll;typedef double ld;int INF=0x3f3f3f3f;int INF2=0x7fffffff;ll LNF=0x3f3f3f3f3f3f3f3f;ll LNF2=0x7fffffffffffffff;

int n,m,Ans;
char str[2005];
int a[2001][2001], b[2001][2001];
int h[2001];
int l[2001],r[2001];
int s[2001],t;

int main(){
	scanf("%d%d",&n,&m); Ans=n;
	F(i,1,n){
		scanf("%s",str+1);
		F(j,1,m) a[i][j]=str[j]=='#';
		F(j,2,m) b[i][j-1]=a[i][j-1]^a[i][j];
	}
	F(j,1,m-1) h[j]=1;
	F(i,2,n){
		F(j,1,m-1) if(b[i][j]==b[i-1][j]) ++h[j]; else h[j]=1;
		s[t=1]=0;
		F(j,1,m-1){
			while(t&&h[s[t]]>=h[j]) --t;
			l[j]=s[t];
			s[++t]=j;
		}
		s[t=1]=m;
		dF(j,m-1,1){
			while(t&&h[s[t]]>=h[j]) --t;
			r[j]=s[t];
			s[++t]=j;
		}
		F(j,1,m-1) Ans=max(Ans,h[j]*(r[j]-l[j]));
	} printf("%d",Ans);
	return 0;
}