fun main(args : Array<String>) {
    val (h, w) = readLine()!!.split(" ").map { it.toInt() }
    val aa = Array(h) { readLine()!!.split(" ").map { it.toInt() }.toMutableList() }

    var cnt = 0
    val ans = mutableListOf<Move>()

    aa.forEachIndexed { hIdx, hList ->
        hList.forEachIndexed { wIdx, a ->
            if (hIdx == h-1) {
                if (wIdx != w-1 && a % 2 == 1) {
                    cnt++
                    aa[hIdx][wIdx+1]++
                    aa[hIdx][wIdx]--
                    ans.add(Move(hIdx, wIdx, hIdx, wIdx+1))
                }
            } else {
                if (a % 2 == 1) {
                    cnt++
                    aa[hIdx+1][wIdx]++
                    aa[hIdx][wIdx]--
                    ans.add(Move(hIdx, wIdx, hIdx+1, wIdx))
                }
            }
        }
    }

    println(cnt)
    ans.forEach { move ->
        println("${move.sY+1} ${move.sX+1} ${move.dY+1} ${move.dX+1}")
    }
}

data class Move(val sY: Int, val sX: Int, val dY: Int, val dX: Int)