#include<bits/stdc++.h>
using namespace std;
int x[520][520];
int main(){
	int n,m;
	cin>>n>>m;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>x[i][j];
		}
	}
	vector<int> a;
	vector<int> b;
	vector<int> c;
	vector<int> d;
	for(int i=0;i<n;i++){
		for(int j=0;j<m-1;j++){
			if(x[i][j]%2==1){
				x[i][j]--;
				x[i][j+1]++;
				a.push_back(i);
				b.push_back(j);
				c.push_back(i);
				d.push_back(j+1);
			}
		}
	}
	for(int i=0;i<n-1;i++){
		if(x[i][m-1]%2==1){
			x[i][m-1]--;
			x[i+1][m-1]++;
			a.push_back(i);
			b.push_back(m-1);
			c.push_back(i+1);
			d.push_back(m-1);
		}
	}
	cout<<a.size()<<endl;
	for(int i=0;i<a.size();i++){
		cout<<a[i]+1<<" "<<b[i]+1<<" "<<c[i]+1<<" "<<d[i]+1<<endl;
	}
	return 0;
}