#include<iostream>//Make Them Even atcode begginer contest 104 标程 
#include<vector>
using namespace std;
int main()
{
	int mp[1000][1000],n,m,sum=0; 
	vector<int> store;
	sum=0;
	cin>>n>>m;
	for(int i=0;i<n;i++)      
	  for(int j=0;j<m;j++)         
    	 scanf("%d",&mp[i][j]);    
	for(int i=0;i<n;i++){       
 	  for(int j=1;j<m-1;j++){           
  	   if(mp[i][j]%2==1){               
       mp[i][j]--; 
       mp[i][j+1]++;  
        
       //cout<<i<<<j;
       //cout<<i<<j+1; 
       store.push_back(i);
       store.push_back(j);
       store.push_back(i);
       store.push_back(j+1);
       sum++;       
       }       
       }   
     }
     
for(int i=0;i<n;i++){       
   for(int j=0;j<m-1;j++){           
     if(mp[i][j]%2==1){ 

            mp[i+1][j]++;
            //cout<<i<<m;
            //cout<<i+1<<m;
            store.push_back(i);
            store.push_back(j);
            store.push_back(i+1);
            store.push_back(j);
            sum++;

    }   
}
}
    cout<<sum; 
   for(int i=0;i<store.size();i=i+4)  
   {
       cout<<store[i]<<store[i+1]<<store[i+2]<<store[i+3];
   }
   return 0;
}