function Main(input) {
  input = input.split("\n");
  var h = parseInt(input[0].split(" ")[0]);
  var w = parseInt(input[0].split(" ")[1]);
  a = new Array(h);
  for(i=0;i<h;i++){
    tmp=input[i+1].split(" ");
    asub=new Array(w);
    for(j=0;j<w;j++){
      asub[j]=parseInt(tmp[j]);
    }
    a[i]=asub;
  }
  var ans="";
  var cnt=0;
  for(i=0;i<h;i++){
    for(j=0;j<w;j++){
      if(a[i][j]%2==1&&j<w-1){
          a[i][j]--;
          a[i][j+1]++;
          var m1=i+1;
          var m2=j+1;
          var m3=j+2;
          ans=ans+m1+" "+m2+" "+m1+" "+m3+"\n";
          cnt++;
      }
      if(a[i][j]%2==1&&i<h-1){
          a[i][j]--;
          a[i+1][j]++;
          var m1=i+1;
          var m2=j+1;
          var m3=i+2;
          ans=ans+m1+" "+m2+" "+m3+" "+m2+"\n";
          cnt++;
      }
    }
  }
  ans=cnt+"\n"+ans;
  ans=ans.slice(0,-1);


  console.log('%s', ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));