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 JAVA):

Solution:
import java.util.*;
import java.io.*;

public class Main {

	void solve() {
		int r = in.nextInt(), c = in.nextInt();
		char[][] a = new char[r][c];
		for (int i = 0; i < r; i++) {
			a[i] = in.nextToken().toCharArray();
		}
		
		int ans = Math.max(r, c);
		int[][] eq = new int[r - 1][];
		int[][] notEq = new int[r - 1][];
		for (int i = 0; i < r - 1; i++) {
			eq[i] = getEq(a[i], a[i + 1], true);
			notEq[i] = getEq(a[i], a[i + 1], false);
		}
		int[] lcp = new int[r - 1];
		int[] left = new int[r - 1], right = new int[r - 1], stack = new int[r];
		
		for (int pos = 0; pos < c; pos++) {
			for (int i = 0; i < r - 1; i++) {
				lcp[i] = Math.max(eq[i][pos], notEq[i][pos]) - pos;
			}
			int head;
			head = 1;
			stack[0] = -1;
			for (int i = 0; i < r - 1; i++) {
				while (head > 1 && lcp[i] <= lcp[stack[head - 1]]) {
					head--;
				}
				left[i] = stack[head - 1] + 1;
				stack[head++] = i;
			}
			head = 1;
			stack[0] = r - 1;
			for (int i = r - 2; i >= 0; i--) {
				while (head > 1 && lcp[i] <= lcp[stack[head - 1]]) {
					head--;
				}
				right[i] = stack[head - 1] - 1;
				stack[head++] = i;
			}
			
			for (int i = 0; i < r - 1; i++) {
				int dist = right[i] - left[i] + 1;
				ans = Math.max(ans, lcp[i] * (dist + 1));
			}
		}
		
		out.println(ans);
	}
	
	int[] getEq(char[] a, char[] b, boolean flag) {
		int[] result = new int[a.length];
		for (int i = 0; i < a.length; ) {
			if ((a[i] == b[i]) != flag) {
				result[i] = i;
				i++;
				continue;
			}
			int j = i;
			while (j < a.length && ((a[j] == b[j]) == flag)) {
				j++;
			}
			for (int t = i; t < j; t++) {
				result[t] = j;
			}
			
			i = j;
		}
		return result;
	}

	FastScanner in;
	PrintWriter out;

	void run() {
		in = new FastScanner();
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public String nextToken() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextToken());
		}

		public long nextLong() {
			return Long.parseLong(nextToken());
		}

		public double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}
}