import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math;
int read() { return readln.chomp.to!int; }
int[] reads() { return readln.split.to!(int[]); }

struct P {
    int y, x;
    this (int _y, int _x) {
        y = _y; x = _x;
    }
}

struct Q {
    P from, to;
    this (P f, P t) {
        from = f; to = t;
    }
}

void main() {
    int h, w; readf("%d %d\n",&h,&w);
    int[][] a;
    foreach (i; 0..h)
        a ~= reads();

    Q[] ans;
    foreach (y; 0..h-1) foreach (x; 0..w) {
        if (!(a[y][x] & 1)) continue;
        a[y][x]--;
        a[y+1][x]++;
        ans ~= Q(P(y, x), P(y+1, x));
    }

    int y = h - 1;
    foreach (x; 0..w-1) {
        if (!(a[y][x] & 1)) continue;
        a[y][x]--;
        a[y][x+1]++;
        ans ~= Q(P(y, x), P(y, x + 1));
    }

    writeln(ans.length);
    foreach (q; ans) {
        writefln("%(%s %)", [q.from.y, q.from.x, q.to.y, q.to.x]
                .map!("a+1")
                .array);
    }
}