There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partitioned into n x m equal-sized square chunks. There are some kinds of flowers planted in each square chunk which can be represented by using lowercase letters. However, Chiaki thinks the garden is not beautiful enough. Chiaki would like to build a water pool in the garden. So that the garden would look like symmetric . The water pool is a rectangle whose size is p x q and the center of the water pool is also the center of the garden. Something else important you should know is: n, m, p and q are all even. p is always less than n. q is always less than m. The borders of the water pool are parallel to the border of garden. Chiaki would like to know the number of different pairs of she can choose.
There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partitioned into n x m equal-sized square chunks. There are some kinds of flowers planted in each square chunk which can be represented by using lowercase letters. However, Chiaki thinks the garden is not beautiful enough. Chiaki would like to build a water pool in the garden. So that the garden would look like symmetric (both horizontally and vertically). The water pool is a rectangle whose size is p x q and the center of the water pool is also the center of the garden. Something else important you should know is: n, m, p and q are all even. p is always less than n. q is always less than m. The borders of the water pool are parallel to the border of garden. Chiaki would like to know the number of different pairs of (p, q) she can choose.