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

Solution:
import sys

input=sys.stdin.readline
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())

def main():
    h, w = MI()
    s = [[c == "#" for c in input()[:-1]] for _ in range(h)]
    #if w == 2:
    #    s = [list(sc) for sc in zip(*s)]
    #    h, w = w, h
    # p2D(s)
    t = [[-1] * (w - 1) for _ in range(h - 1)]
    for i in range(h - 1):
        si = s[i]
        si1 = s[i + 1]
        t[i] = [1 - (sum(si[j:j + 2]) + sum(si1[j:j + 2])) % 2 for j in range(w - 1)]
    # p2D(t)
    # print()
    ti=t[0]
    for i in range(1, h - 1):
        ti1=ti
        ti=t[i]
        for j in range(w - 1):
            if ti[j]: ti[j] = ti1[j] + 1
    # p2D(t)
    ans = 0
    for i in range(h - 1):
        jtol = [0] * (w - 1)
        jtor = [0] * (w - 1)
        ti=t[i]
        # 高さ、位置の順
        stack = [[-1, 0]]
        for j in range(w - 1):
            tij=ti[j]
            while stack[-1][0] >= tij: stack.pop()
            jtol[j] = stack[-1][1]
            stack.append([tij, j + 1])

        stack = [[-1, w - 1]]
        for j in range(w - 2, -1, -1):
            tij=ti[j]
            while stack[-1][0] >= tij: stack.pop()
            jtor[j] = stack[-1][1]
            stack.append([tij, j])

        for j in range(w - 1):
            tmp = (jtor[j] - jtol[j] + 1) * (ti[j] + 1)
            if tmp > ans: ans = tmp
    print(max(ans,h,w))

main()