Orez likes to collect mysterious data and often arranges them into a matrix for research. Recently, Orez obtained some data and arranged it into an $n \times m$ matrix. Through observation, Orez discovered that this data contains a peculiar number: the count of square submatrices that are both vertically and horizontally symmetric.
Orez naturally wants to know what this number is, but the matrix is too large to count manually. Please write a program to calculate this number.
Input
The first line contains two integers $n$ and $m$. The next $n$ lines each contain $m$ positive integers, representing the matrix Orez obtained.
Output
The output should contain a single integer answer, representing the number of square submatrices in the matrix that are both vertically and horizontally symmetric.
Examples
Input 1
5 5 4 2 4 4 4 3 1 4 4 3 3 5 3 3 3 3 1 5 3 3 4 2 1 2 4
Output 1
27
Constraints
For 30% of the data: $n, m \le 100$
For 100% of the data: $n, m \le 1000$, the values in the matrix are $\le 10^9$