fun main(args: Array<String>) {
    val (h, w) = readInputLine().split(" ").map{it.toInt()}
    
    val arr = Array(h, {IntArray(w)})
    
    for (i in 1..h) {
        val row = readInputLine().split(" ").map{it.toInt()}
        for (j in 1..w) {
            arr[i - 1][j - 1] = row[j - 1]
        }
    }
    
    // (from(x, y), to(x, y))
    val ops = mutableListOf<Pair<Pair<Int, Int>, Pair<Int, Int>>>()
    
    for (i in 0 until h) {
        for (j in 0 until w) {
            if (arr[i][j] % 2 == 1) {
                if (j == w - 1) {
                    if (i != h - 1) {
                        arr[i][j]--
                        arr[i + 1][j]++
                        ops.add(Pair(Pair(i + 1, j + 1), Pair(i + 2, j + 1)))
                    }
                } else {
                    arr[i][j]--
                    arr[i][j + 1]++
                    ops.add(Pair(Pair(i + 1, j + 1), Pair(i + 1, j + 2)))
                }
            }
        }
    }
    
    println(ops.size)
    for (op in ops) {
        val from = op.first
        val to = op.second
        
        println("${from.first} ${from.second} ${to.first} ${to.second}")
    }
}

fun readInputLine(): String {
    return readLine()!!
}
