object Main extends App {
	val Array(h, w) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	val a = Array.ofDim[Int](h, w)

	for(i<-0 until h){
		a(i) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	}

	var ans1 = List[(Int, Int, Int, Int)]()
	var list = new Array[(Int, Int)](h*w)

	for(i<-0 until h; j<-0 until w) list(i*w + j) = (i, j)

	for(i<-0 until (h*w-1)){
		val x = list(i)._1
		val y = list(i)._2

		val s = list(i+1)._1
		val t = list(i+1)._2

		if(a(x)(y)%2 == 1){
			a(x)(y) -= 1
			a(s)(t) += 1
			ans1 = (x,y,s,t) :: ans1
		}
	}

	println(ans1.size)
	for(x <- ans1.reverse){
		myP(x._1, x._2, x._3, x._4)
	}

	def myP(x: Int, y: Int, a: Int, b: Int): Unit = {
		println(Array(x+1,y+1,a+1,b+1).mkString(" "))
	}



}