You are given a rectangular table A of size R \times C, filled with digits (a_{ij} for 0 \leq i < R, 0 \leq j < C). Additionally, you are given a table B of size H \times W, filled with zeros and ones (b_{ij} for 0 \leq i < H, 0 \leq j < W).
Your task is to find the maximum value of the following function for two variables and :
where 0 \leq x \leq R-H and 0 \leq y \leq C-W.
The first line contains two integers and (1 \leq R, C \leq 800). Each of the next lines contains characters, the elements of table A (0 \leq a_{ij} \leq 9).
The next line contains two integers and (1 \leq H \leq R, 1 \leq W \leq C). Each of the following lines contains characters, the elements of table B. Each character is either or .
Print the maximum value of the function cost.
Example 1