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 ans = List[(Int, Int, Int, Int)]()

	for(i<-0 until h){
		for(j<-0 until w){
			if(a(i)(j)%2!=0){
				if(j!=w-1){
					a(i)(j+1)+=1
					ans=(i, j, i, j+1) :: ans
				}
				else if(i!=h-1){
					a(i+1)(j)+=1
					ans=(i, j, i+1, j) :: ans
				}
			}
		}
	}

	println(ans.size)
	for(x <- ans){
		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(" "))
	}

}
