Snuke has a grid with $H$ rows and $W$ columns. The square at the $i$\-th row and $j$\-th column contains a character $S_{i,j}$.
He can perform the following two kinds of operation on the grid:
* Row-reverse: Reverse the order of the squares in a selected row.
* Column-reverse: Reverse the order of the squares in a selected column.
For example, reversing the $2$\-nd row followed by reversing the $4$\-th column will result as follows:

By performing these operations any number of times in any order, how many placements of characters on the grid can be obtained?
## Constraints
* $1≦H,W≦200$
* $S_{i,j}$ is a lowercase English letter (`a`\-`z`).
## Input
The input is given from Standard Input in the following format:
$H$ $W$
$S_{1,1}$$S_{1,2}$$...$$S_{1,W}$
$S_{2,1}$$S_{2,2}$$...$$S_{2,W}$
$:$
$S_{H,1}$$S_{H,2}$$...$$S_{H,W}$
[samples]