#include <bits/stdc++.h>
using namespace std;

int main(){
  int H,W,i,j;
  cin>>H>>W;
  bool a[H][W];
  int x;
  for(i=0;i<H;i++){
	for(j=0;j<W;j++){
		cin>>x;
		a[i][j]=(x%2==1);
	}
  }
  vector<int> v1,v2,v3,v4;
  for(i=0;i<H;i++){
	for(j=0;j<W-1;j++){
		if(a[i][j]){
		v1.push_back(i);
		v2.push_back(j);
		v3.push_back(i);
		v4.push_back(j+1);
		a[i][j+1]=!a[i][j+1];
		}
	}
  }
  for(i=0;i<H-1;i++){
	if(a[i][W-1]){
		v1.push_back(i);
		v2.push_back(W-1);
		v3.push_back(i+1);
		v4.push_back(W-1);
		a[i+1][W-1]=!a[i+1][W-1];
	}
  }
  cout<<v1.size()<<endl;
  for(i=0;i<v1.size();i++){
	cout<<v1[i]+1<<" "<<v2[i]+1<<" "<<v3[i]+1<<" "<<v4[i]+1<<endl;
  }
  return 0;
}