Experimental building area

The land is divided into squares forming a rectangular grid which rows and columns run in east-west and nort-south direction, respectively.
The experimental building will be built on some squares which are called the building area and which form a shape similar to capital 'H' letter.
The building area consists of three wings. Each wing is a straight sequence of adjacent squares, its width is one square. There is the western wing, central wing and eastern wing, abbreviated as W-wing, C-Wing and E-wing. Both W-wing and E-wing are oriented in the south-north direction and their length is the same. Moreover, the northernmost square of W-wing is in the same row as the northernmost square of E-wing. C-wing is oriented in east-west direction and it connects W-wing and E-wing. C-wing cannot be connected to the northernmost or to the southernmost squares of W-wing and E-wing. Each square in the grid is assigned a quality degree based on thorough geological and environmental anlysis. There are three quality degrees: good, suspect and poor. The building area cannot contain any square of poor quality and it can contain at most one square of suspect quality.

The building committee task is to select a maximum building area given the rules described above. The size of the building area is equal to the number of squares it contains.



Image 1. Example of a grid in scheme a). Good quality, suspect quality and poor quality squares are shown in blue, yellow and red, respectively. Each of schemes b), c) and d) highlights one possible building area in the same grid. The size of the building area in scheme d) is 12 and it is the maximum building area in the given grid. The schemes illustrate Example 1 below.

The task

A grid and the qualities of all its squares are given. Calculate the maximum size of a building area in the grid.


Input

The grid is represented in the input as a rectangular matrix of characters. The matrix top row is the northernmost row of the grid, the matrix leftmost column is the westernmost column of the grid. The first input line contains two integers M and N representing the number of rows and the number of columns of the input matrix. Next, there are exactly M lines. Each line contains a string of length N which describes the quality of the squares in the corresponding grid row. Good square is represented by dot character, suspect square is represented by small 'o' character and bad square is represented by capital 'X' character. It holds 2 ≤ M, N ≤ 500.

Output

The output contains one text line with one integer representing the the maximum size of a building area in the input grid. It is guaranteed that at least one building area can be found in the input grid.

Example 1

Input
6 9
......oo.
.X.X..X.o
..o..o...
..X.....o
.o..oX...
ooo...o.o
Output
12

Example 2

Input
15 15
o.............o
.o...........o.
..o.........o..
...o.......o..X
.X..o.....o....
.....o...o...X.
......o.o......
.....X.o...X...
......o.o......
X....o...o.....
....o.....o....
...o....X..o...
..o.........o..
.o...X.......o.
o.............o
Output
21

Example 3

Input
12 6
..o...
.....X
..X...
o.Xo.o
.oX.o.
.....X
X.o..X
X....X
X.....
...o..
o..Xo.
..o..X
Output
16

Public data

The public data set is intended for easier debugging and approximate program correctness checking. The public data set is stored also in the upload system and each time a student submits a solution it is run on the public dataset and the program output to stdout and stderr is available to him/her.
Link to public data set