Vasya has a beautiful garden where wonderful fruit trees grow and yield fantastic harvest every year. But lately thieves started to sneak into the garden at nights and steal the fruit too often. Vasya can’t spend the nights in the garden and guard the fruit because there’s no house in the garden! Vasya had been saving in for some time and finally he decided to build the house. The rest is simple: he should choose in which part of the garden to build the house. In the evening he sat at his table and drew the garden’s plan. On the plan the garden is represented as a rectangular checkered field n × m in size divided into squares whose side length is 1. In some squares Vasya marked the trees growing there (one shouldn’t plant the trees too close to each other that’s why one square contains no more than one tree). Vasya wants to find a rectangular land lot a × b squares in size to build a house on, at that the land lot border should go along the lines of the grid that separates the squares. All the trees that grow on the building lot will have to be chopped off. Vasya loves his garden very much, so help him choose the building land lot location so that the number of chopped trees would be as little as possible.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 50) which represent the garden location. The next n lines contain m numbers 0 or 1, which describe the garden on the scheme. The zero means that a tree doesn’t grow on this square and the 1 means that there is a growing tree. The last line contains two integers a and b (1 ≤ a, b ≤ 50). Note that Vasya can choose for building an a × b rectangle as well a b × a one, i.e. the side of the lot with the length of a can be located as parallel to the garden side with the length of n, as well as parallel to the garden side with the length of m.

Output

Print the minimum number of trees that needs to be chopped off to select a land lot a × b in size to build a house on. It is guaranteed that at least one lot location can always be found, i. e. either a ≤ n and b ≤ m, or a ≤ m и b ≤ n.

Examples

Input

2 2
1 0
1 1
1 1


Output

0


Input

4 5
0 0 1 0 1
0 1 1 1 0
1 0 1 0 1
1 1 1 1 1
2 3


Output

2

Note

In the second example the upper left square is (1,1) and the lower right is (3,2).
/**
 * Created by IntelliJ IDEA.
 * User: Taras_Brzezinsky
 * Date: 8/12/11
 * Time: 8:02 PM
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.FileReader;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.Arrays;

public class Backyard extends Thread {

    public Backyard() {
        this.input = new BufferedReader(new InputStreamReader(System.in));
        this.output = new PrintWriter(System.out);
        this.setPriority(Thread.MAX_PRIORITY);
    }

    public void run() {
        try {
            int n = nextInt(), m = nextInt();
            int [][]garden = new int[n][m];
          
            int minCut = Integer.MAX_VALUE;
            for (int i = 0; i < n; ++i) {
                for (int j = 0; j < m; ++j) {
                    garden[i][j] = nextInt();
                }
            }
              int a = nextInt(), b = nextInt();
            for (int x = 0; x + a <= n; ++x) {
                for (int y = 0; y + b <= m; ++y) {
                    int current = 0;
                    for (int i = 0; i < a; ++i) {
                        for (int j = 0; j < b; ++j) {
                            current += garden[x + i][y + j];
                        }
                    }
                    minCut = Math.min(minCut, current);
                }
            }

            for (int x = 0; x + b <= n; ++x) {
                for (int y = 0; y + a <= m; ++y) {
                    int current = 0;
                    for (int i = 0; i < b; ++i) {
                        for (int j = 0; j < a; ++j) {
                            current += garden[x + i][y + j];
                        }
                    }
                    minCut = Math.min(minCut, current);
                }
            }
            output.println(minCut);
            output.flush();
            output.close();

        } catch (Throwable e) {
            System.err.println(e.getMessage());
            System.err.println(Arrays.deepToString(e.getStackTrace()));
        }
    }


    public static void main(String[] args) {
        new Backyard().start();
    }

    private String nextToken() throws IOException {
        while (tokens == null || !tokens.hasMoreTokens()) {
            tokens = new StringTokenizer(input.readLine());
        }
        return tokens.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }


    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}
