#include <iostream>
#include<vector>
using namespace std;

int main() {
	int h,w;cin>>h>>w;
	vector<vector<int>> a(h,vector<int>(w,0)),a2;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			cin>>a[i][j];
		}
	}
	a2=a;
	int count=0;
	for(int i=0;i<h;i++){
		for(int j=0;j<w-1;j++){
			if(a[i][j]%2){
				count++;
				a[i][j+1]++;
			}
		}
	}
	for(int i=0;i<h-1;i++){
		if(a[i][w-1]%2){
			count++;
			a[i+1][w-1]++;
		}
	}
	cout<<count<<endl;
	a=a2;
	for(int i=0;i<h;i++){
		for(int j=0;j<w-1;j++){
			if(a[i][j]%2){
				count++;
				a[i][j+1]++;
				cout<<i+1<<' '<<j+1<<' '<<i+1<<' '<<j+2<<endl;
			}
		}
	}
	for(int i=0;i<h-1;i++){
		if(a[i][w-1]%2){
			count++;
			a[i+1][w-1]++;
			cout<<i+1<<' '<<w<<' '<<i+2<<' '<<w<<endl;
		}
	}

	return 0;
}