Xiao Bai's birthday is coming up, and Xiao Lan has decided to give a handmade craft to make the gift unique. Specifically, Xiao Lan has already created a $p \times q \times r$ wooden block (composed of $pqr$ unit wooden blocks). However, due to Xiao Lan's lack of craftsmanship, some of the unit blocks in this wooden block are defective (having cracks, being hollow inside, etc.). Xiao Lan cannot give such a gift directly.
Therefore, Xiao Lan decided to carve out an $a \times a \times b$ sub-block from this wooden block (meaning the rectangular block carved out must have two adjacent sides of equal length). Naturally, this sub-block must not contain any defective unit blocks. To ensure the block can contain more patterns, Xiao Lan hopes to choose the solution that maximizes the value of $4ab$ from all feasible options. However, Xiao Lan has exhausted all energy just by detecting which parts of the block are defective. As Xiao Lan's friend, can you help?
Input
Each input file contains only one test case.
The first line contains three space-separated positive integers, $p, q, r$.
Following this are $pq$ lines, each containing $r$ characters. Each character is either 'P' (Poor) or 'N' (Nice), indicating whether the unit block is defective or not. Specifically, the $z$-th character of the $1+(y-1)p+(x-1)+1$ line (or more simply, the $z$-th character of the line corresponding to coordinates $(x, y)$) describes the state of the unit block at coordinates $(x, y, z)$. ($1 \le x \le p, 1 \le y \le q, 1 \le z \le r$)
Output
The output file contains only one integer, representing the maximum value of $4ab$ for the best solution.
Examples
Input 1
3 2 5 PNNNN PNNNN NPPNP PNNNP NNNNP PPNNP
Output 1
24
Constraints
For 100% of the data, $0 < p, q, r \le 150$, and the input contains at least one 'N'.