Farmer John is going into the ice cream business! He has built a machine that produces blobs of ice cream, unfortunately of rather irregular shapes, and he hopes to tune the machine so that it produces more reasonable shapes.
The ice cream produced by the machine can be described by an n \times n grid, for example:
##....
....#.
.#..#.
.#####
...###
....##Each character . denotes an empty cell, and each character # denotes a 1 \times 1 square cell of ice cream.
Unfortunately, the machine does not work very well at the moment and may produce several separate blobs of ice cream (the figure above contains two). A blob is a maximal set of ice cream cells such that from any of its cells one can reach any other by repeatedly stepping to an adjacent ice cream cell to the north, south, east or west.
Farmer John wants to find the area and the perimeter of the blob with the largest area. The area of a blob is the number of # cells in it. The perimeter of a blob is the number of sides of its cells that border a cell not belonging to the blob (an empty cell or the outside of the grid). If several blobs have the same largest area, he wants the smallest perimeter among them. In the figure above, the smaller blob has area and perimeter , and the larger blob has area and perimeter .
Note that a blob may have a "hole" inside it (empty space surrounded by ice cream). In this case, the boundary of the hole also counts towards the perimeter of the blob. Blobs can also be nested inside other blobs; in this case, they are treated as separate blobs. For example, the following grid contains a blob of area nested inside a blob of area :
#####
#...#
#.#.#
#...#
#####Knowing both the area and the perimeter of a blob is important, because Farmer John ultimately wants to minimize the ratio of perimeter to area, a quantity he calls the icyperimetric measure of his ice cream. The smaller this ratio, the slower the ice cream melts, since it has less surface relative to its mass.
The first line contains an integer n~(1 \le n \le 1000). Each of the next lines contains a string of characters . and # describing the output of the machine. It is guaranteed that there is at least one character #.
Print two integers — the area of the largest blob and its perimeter. If several blobs have the same largest area, print the data for the one with the smallest perimeter.
Example 1