#include<stdio.h>
int main(void){
  system("python3 -c \"h,w=map(int,input().split())\na=[list(map(int,input().split()))for _ in range(h)]\nans=[]\nfor i in range(h):\n  for j in range(w-1):\n    if a[i][j]%2:\n      a[i][j+1]+=1\n      ans.append([i+1,j+1,i+1,j+2])\n  if i<h-1 and a[i][w-1]%2:\n    a[i+1][w-1]+=1\n    ans.append([i+1,w,i+2,w])\nprint(len(ans))\nfor t in ans:\n  print(*t)\n\"");
  return 0;
}