fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main(args: Array<String>) {
    data class History(val from: Pair<Int, Int>, val to: Pair<Int, Int>) {
        override fun toString(): String {
            return "${from.first + 1} ${from.second + 1} ${to.first + 1} ${to.second + 1}"
        }
    }
    val (h, w) = intList()
    val hw = Array(h) { Array(w) { 0 } }
    repeat(h) { y ->
        val a = intList()
        a.forEachIndexed { x, v ->
            hw[y][x] = v
        }
    }
    var n = 0
    val history = mutableListOf<History>()
    repeat(h) { y ->
        repeat(w) { x ->
            val v = hw[y][x]
            if (y + 1 == h) {
                if (x + 1 < w && v % 2 == 1) {
                    n++
                    hw[y][x]--
                    hw[y][x + 1]++
                    history.add(History(Pair(y, x), Pair(y, x + 1)))
                }
            } else {
                if (v % 2 == 1) {
                    n++
                    hw[y][x]--
                    hw[y + 1][x]++
                    history.add(History(Pair(y, x), Pair(y + 1, x)))
                }
            }
        }
    }
    buildString {
        appendln(n)
        history.forEach {
            appendln(it)
        }
    }.let {
        println(it.trimIndent())
    }
}
