open System
let mutable line = Console.ReadLine().Split()
let H = int32(line.[0])
let W = int32(line.[1])
line <- Console.ReadLine().Split();
let N = int32(line.[0]);
let M = int32(line.[1]);
line <- Console.ReadLine().Split();
let T = int32(line.[0]);
let grids = Array2D.create H W 0
for r in 0..H-1 do
let line = Console.ReadLine().Split()
for c in 0..W-1 do
grids.[r,c] <- int32(line.[c])
let getRectSum r c =
let mutable sum = 0
for i in r..r+N-1 do
for j in c..c+M-1 do
sum <- sum + grids.[i,j]
sum
let s = seq {
for r in 0..H-N do
for c in 0..W-M do
let rectSum = getRectSum r c
if rectSum >= T*N*M
then
printfn "1" |> ignore
printfn "%d %d %d %d" r c (r+N-1) (c+M-1) |> ignore
yield true
else
yield false
}
match Seq.tryFind(fun x -> x = true) s with
| Some(found) -> () |> ignore
| None -> printfn "0" |> ignore