{"raw_statement":[{"iden":"problem statement","content":"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 `.`.\nSnuke can perform the following operation on the grid any number of times:\n\n*   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).\n\nThen, Snuke draws a rectangle along grid lines. Here, all the squares contained in the rectangle must be painted in black.\nFind the maximum possible area of Snuke's rectangle when the operation is performed optimally."},{"iden":"constraints","content":"*   $2 \\leq H \\leq 2000$\n*   $2 \\leq W \\leq 2000$\n*   $|S_i| = W$\n*   $S_i$ consists of `#` and `.`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$H$ $W$\n$S_1$\n$S_2$\n$:$\n$S_H$"},{"iden":"sample input 1","content":"3 3\n..#\n##.\n.#."},{"iden":"sample output 1","content":"6\n\nIf 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:\n![image](https://atcoder.jp/img/arc081/2995c3921ed4dffc8ee528b63b9c6118.png)"},{"iden":"sample input 2","content":"4 4\n....\n....\n....\n...."},{"iden":"sample output 2","content":"16"},{"iden":"sample input 3","content":"10 8\n##...#.#\n##...#.#\n..###.#.\n#.##.#.#\n.#..#.#.\n..##.#.#\n##.#.#..\n...#.#..\n###.#.##\n###..###"},{"iden":"sample output 3","content":"27"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}