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.

-----Sample Input-----
3 3
..#
##.
.#.

-----Sample Output-----
6

If the first row from the top and the third column from the left are inverted, a 2 \times 3 rectangle can be drawn, as shown below:

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'mod = 1000000007\neps = 10**-9\n\n\ndef main():\n    import sys\n    input = sys.stdin.readline\n\n    # O(N)\n    def largest_rectangle_histogram(A):\n        A.append(0)\n        N = len(A)\n        ret = 0\n        st = [-1]\n        left = [0] * N\n        for i in range(N):\n            while A[st[-1]] >= A[i]:\n                # ret = max(ret, A[st[-1]] * (i - left[st[-1]] - 1))\n                ret = max(ret, (A[st[-1]] + 1) * (i - left[st[-1]]))\n                st.pop()\n                if not st:\n                    break\n            if st:\n                left[i] = st[-1]\n            else:\n                left[i] = -1\n            st.append(i)\n        return ret\n\n    # O(H * W)\n    def largest_rectangle_grid(grid, ok=1, ng=0):\n        H = len(grid)\n        W = len(grid[0])\n        hist = [[0] * W for _ in range(H)]\n        for h in range(H):\n            for w in range(W):\n                if grid[h][w] == ok:\n                    hist[h][w] = hist[h - 1][w] + 1\n        ret = 0\n        for h in range(H):\n            ret = max(ret, largest_rectangle_histogram(hist[h]))\n        return ret\n\n    H, W = list(map(int, input().split()))\n    grid = []\n    for _ in range(H):\n        grid.append(input().rstrip(\'\\n\'))\n\n    corner = [[0] * (W-1) for _ in range(H-1)]\n    for h in range(H-1):\n        for w in range(W-1):\n            cnt = 0\n            if grid[h][w] == "#":\n                cnt += 1\n            if grid[h+1][w] == "#":\n                cnt += 1\n            if grid[h][w+1] == "#":\n                cnt += 1\n            if grid[h+1][w+1] == "#":\n                cnt += 1\n            if cnt%2 == 0:\n                corner[h][w] = 1\n    print((max(largest_rectangle_grid(corner), H, W)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14761