#include "bits/stdc++.h"
using namespace std;
char ans[250010][256]={""};
int main(){
	int h,w,in;cin>>h>>w;
	bool mp[550][550];int ansc=-1;
	for (int j=0;j<h;++j)for (int i=0;i<w;++i)cin>>in,mp[j][i]=in%2;
	for (int j=0;j<h;++j){
		for (int i=0; i<w-1; ++i)
			if (mp[j][i]){mp[j][i]=0;mp[j][i+1]=!mp[j][i+1];sprintf(ans[++ansc],"%d %d %d %d\n",j+1,i+1,j+1,i+2);}
		if(j!=h-1&&mp[j][w-1]){mp[j][w-1]=0;mp[j+1][w-1]=!mp[j+1][w-1];sprintf(ans[++ansc],"%d %d %d %d\n",j+1,w,j+2,w);}
	}cout<<ansc+1<<endl;for (int i=0;i<=ansc;++i)cout<<ans[i];
	getchar();
	getchar();
}