#include <bits/stdc++.h>
using namespace std;
int main()
{
	int h,w;
	cin>>h>>w;
	vector <vector <int> > a(h,vector <int> (w));
	for(int i=0;i<h;i++)
	{
		for(int j=0;j<w;j++)
		{
			cin>>a[i][j];
		}
	}
	vector <int> y1,x1,y2,x2;
	for(int i=0;i+1<h;i++)
	{
		for(int j=0;j<w;j++)
		{
			if(a[i][j]%2==1)
			{
				a[i+1][j]++;
				a[i][j]--;
				y1.push_back(i);
				x1.push_back(j);
				y2.push_back(i+1);
				x2.push_back(j);
			}
		}
	}
	for(int j=0;j+1<w;j++)
	{
		if(a[h-1][j]%2==1)
		{
			a[h-1][j+1]++;
			a[h-1][j]--;
			y1.push_back(h-1);
			x1.push_back(j);
			y2.push_back(h-1);
			x2.push_back(j+1);
		}
	}
	cout<<y1.size()<<"\n";
	for(int i=0;i<y1.size();i++)
	{
		printf("%d %d %d %d\n",y1[i]+1,x1[i]+1,y2[i]+1,x2[i]+1);
	}
 	return 0;
}
