#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.);
const long long mod = 1000000007;
typedef long long ll;
//printf("%.12lf\n",mid);
//const long long sze = 2*(2^(long long)(ceil(log(100000)/log(2))));
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
long long lcm(int a, int b){
  return ((long long)a*(long long)b)/gcd(a, b);
}
inline void prep()
{
    cin.tie(0);
    cin.sync_with_stdio(0);
};
long long modpow(long long x, long long n) { 
  if (n == 0) return 1%mod; 
  long long u = modpow(x,n/2); 
  u = (u*u)%mod; 
  if (n%2 == 1) u = (u*x)%mod; 
  return u;
}
 
long long modpow2(long long x, long long n, long long modd) { 
  if (n == 0) return 1LL%modd; 
  long long u = modpow2(x,n/2LL, modd); 
 
  u = (long long)(u*u)%modd; 
  if (n%2LL == 1) u = (long long)(u*x)%modd; 
  return u;
}
 
bool chosen[1001]={false};

vector<int> permutation;
int arr[4];
bool mapp[501][501] = {{false}};
int maxxx = -1;
void search(int n) {
  if (permutation.size() == n) {
    
  } else {
    for (int i = 0; i < n; i++) {
      if (chosen[i]) continue;
      chosen[i] = true;
      permutation.push_back(i);
      search(n);
      chosen[i] = false;
      permutation.pop_back();
    }
  }
}

vector<long long> primeFactors(long long n)
{
    // Print the number of 2s that divide n
    vector<long long> res;
    bool found = false;
    while (n%2 == 0)
    {
      found = true;
        n = n/2;
    }
    if (found){
      res.push_back(2);
    }
    // n must be odd at this point.  So we can skip 
    // one element (Note i = i +2)
    for (int i = 3; i <= sqrt(n); i = i+2)
    {
      
        // While i divides n, print i and divide n
        bool found2 = false;
        while (n%i == 0)
        { 
          found2 = true;
            n = n/i;
        }
        if (found2){
          res.push_back(i);
        }
    }

    // This condition is to handle the case when n 
    // is a prime number greater than 2
    if (n > 2)
        res.push_back(n);
    return res;
}
int n, m;
bool ok(int i, int j){
  if (i < 0 || i >=n){
    return false;
  }
  if (j < 0 || j >=m){
    return false;
  }
  return true;
}
int main(){
  prep();
  
  cin >> n >> m;
  int arr[n][m];
  bool odds[n][m]; 
  vector<pair<int, int> > oddpos;
  vector<vector<pair<int, int> > > paths;
  for (int i=0; i<n; i++){
    for (int j=0; j<m; j++){
      
      cin >> arr[i][j];
      if (arr[i][j]%2 == 1){
        odds[i][j] = true;
        oddpos.push_back({i, j});
      }else{
        odds[i][j] = false;
      }
      
    }
  }
  bool visitedr[n][m];
  for (int i=0; i<n; i++){
    for (int j=0; j<m; j++){
      visitedr[i][j] = false;
    }
  }
  vector<pair<pair<int, int>, pair<int, int> > > moves;
  for (int i=0; i<n; i++){
    for (int j=0; j<m; j++){
      if (arr[i][j]%2 == 1){
        
        if (ok(i+1, j) && arr[i+1][j]%2 == 1){
          
            moves.push_back({{i, j}, {i+1, j}});
            arr[i][j]--;
            arr[i+1][j]++;
         
        }else if (ok(i, j+1) && arr[i][j+1]%2 == 1){
          
          
            moves.push_back({{i, j}, {i, j+1}});
            arr[i][j]--;
            arr[i][j+1]++;
          
        }else if (ok(i+1, j)){
          
          moves.push_back({{i, j}, {i+1, j}});
          arr[i][j]--;
          arr[i+1][j]++;
        }else if (ok(i, j+1)){
          moves.push_back({{i, j}, {i, j+1}});
          arr[i][j]--;
          arr[i][j+1]++;
        }
      }
    }
  }
  cout << moves.size() << endl;
  for (int i=0 ;i<moves.size(); i++){
    cout << moves[i].first.first+1 << " " << moves[i].first.second+1 << " " << moves[i].second.first+1 << " " << moves[i].second.second+1 << endl;
  }
  return 0;
}
// if TLE think about switching or removing loops & try not to use vector functions like size() or create new vector in a loop
// never use brackets with map when accessing value
// if the input/output is just a number see if it fits into a function (linearly, exponentially)
// if getting error for no reason check overflows
// if can't think of anything efficient try brute force
// look at solved problems of other ppl 2 see which is easiest
// if can precompute 
// if getting random error w/ loop check if boundaries are being changed during loop
// if you can't solve any more problems check for hacks in ur code then hack 
// in reversing problems if checking for a pattern use write down indices
// if already sure about wrong answers check TLE

Measured memory_bytes: 7664