#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define SIZE 200005
#define INF 1000000005LL
#define MOD 1000000007

using namespace std;
typedef long long int ll;
typedef pair <int,int> P;

struct anss{int a,b,c,d;};
int H,W;
int A[505][505];

int main()
{
	cin >> H >> W;
	rep(i,0,H) rep(j,0,W) cin >> A[i][j];
	vector<anss> ans;

	rep(i,0,H) rep(j,0,W-1) {
		if(A[i][j]%2 == 1){
			ans.push_back((anss){i,j,i,j+1});
			A[i][j+1]++;
		}
	}

	rep(i,0,H-1) {
		if(A[i][W-1]%2 == 1){
			ans.push_back((anss){i,W-1,i+1,W-1});
			A[i+1][W-1]++;
		}
	}

	cout << ans.size() << endl;
	rep(i,0,ans.size()) {
		cout << ans[i].a+1 << " " << ans[i].b+1
			<< " " << ans[i].c+1 << " " << ans[i].d+1 << endl;
	}

	return 0;
}
