#include <bits/stdc++.h>

using namespace std;

int main(){
 long h,w; 
  cin >> h >> w;
  
 long a[h][w];
  for(int i=0;i<h;i++){
   for(int j=0;j<w;j++) cin >> a[i][j];
  }
  
  vector<tuple<long,long,long,long>> v;
   
  for(int i=0;i<h;i++){
   for(int j=0;j<w-1;j++){
     if(a[i][j]%2){ a[i][j]--;
                    a[i][j+1]++;
                   v.push_back(make_tuple(i+1,j+1,i+1,j+2));
                  }   
   }   
  } 
  
  for(int i=0;i<h-1;i++){
    if(a[i][w-1]%2){ a[i][w-1]--;
                    a[i+1][w-1]++;
                   v.push_back(make_tuple(i+1,w,i+2,w));
                  }   
  }
  
  cout << v.size() << endl;
  for(int i=0;i<v.size();i++) cout << get<0>(v[i]) << " " << get<1>(v[i]) << " " << get<2>(v[i]) << " " << get<3>(v[i]) << endl;  
  
}
