The Don and Mohanagar

Limits 1s, 512 MB

Dhaka “Mohanagar” can be shown as a $2$-dimensional grid $G$ consisting of  $N$ rows, and $M$ columns. Each cell can be defined as a part of Land $L$ or Water $W$.

As a Don, you want to occupy the city. There are some criteria that you must follow to do that.

• You can only occupy some area if the area has height $h$ and width $w$.

• All cells of the selected area should either be Land or Water.

• You can select areas multiple times from the grid.

• Your selected areas can intersect with each other.

Given the numbers $N, M, h,w$ and the grid $G$, you have to answer the maximum number of distinct cells you can possess over the grid.

Input

The test case will contain four integers $N, M, h$ and $w$ separated by spaces where $N$ and $M$ are the numbers of rows and columns of the grid, $h$ and $w$ are the height and width of the area you can select.

Next $N$ lines will contain $M$ characters, which in total represent the grid $G$, Where $G[i][j] = ‘L’$ or $G[i][j] = ‘W’ \:$where $\: ( 1\le i\le N)$ and $(1\le j\le M)$

$1\le N,M\le 100$

$1\le h,w\le100$

Note: $1\le h\le N$ and $1\le w\le M$.

Output

For each test case, you have to output an integer which is the maximum number of distinct cells you can possess over the grid.

Check out the samples for clarification.

Samples

InputOutput
3 3 2 2
LLL
LLW
LWW

4

InputOutput
2 4 2 2
LLLW
LLLW

6


Explanation of second sample,
First, we can take an area of 2*2 (showed using red) this gives us 4 new { (1,1), (1,2), (2,1), (2,2) } cells to the ans. Secondly, we can take another area of 2*2 (showed using blue) this gives us 2 new { (1,3), (2,3) } cells to the ans (2 cells (1,2) and (2,2) were already calculated for the red region). After this, we can’t take any area of 2*2 with given conditions. So our answer is 6.