fun main(args:Array<String>):Unit {
    while (true) {
        val n = readLine()!!.toInt()
        if (n == 0) return
        val (w, h) = readLine()!!.trim().split(' ').map(String::toInt)
        val state = Array(h){Array(w){0}}
        val tree = Array(n){
            val (x, y) = readLine()!!.trim().split(' ').map(String::toInt)
            Pair(x - 1, y - 1)
        }
        val (s, t) = readLine()!!.trim().split(' ').map(String::toInt)
        tree.forEach { (x, y) ->
            state[y][x]++
            if (y + t in 0 until h) state[y + t][x]--
            if (x + s in 0 until w) state[y][x + s]--
            if (y + t in 0 until h && x + s in 0 until w) state[y + t][x + s]++
        }
        for (y in 1 until h) for (x in 0 until w) state[y][x] += state[y - 1][x]
        for (y in 0 until h) for (x in 1 until w) state[y][x] += state[y][x - 1]

        println(state.mapNotNull{it.max()}.max()!!)
    }
}
