import std.stdio;
import std.algorithm;
import std.conv;
import std.math;
import std.string;

void main()
{
	auto tokens = split(chomp(readln()));
	auto h = to!int(tokens[0]);
	auto w = to!int(tokens[1]);
	int[][] cell;
	cell.length = h;
	foreach (y; 0..h)
	{
		foreach (token; split(chomp(readln())))
		{
			cell[y] ~= to!int(token);
		}
	}

	int[][] result;
	foreach (y; 0..h-1)
	{
		foreach (x; 0..w)
		{
			if (cell[y][x] % 2 == 1)
			{
				--cell[y][x];
				++cell[y+1][x];
				result ~= [y+1, x+1, y+2, x+1];
			}
		}
	}
	foreach (x; 0..w-1)
	{
		if (cell[h-1][x] % 2 == 1)
		{
			--cell[h-1][x];
			++cell[h-1][x+1];
			result ~= [h, x+1, h, x+2];
		}
	}

	writeln(result.length);
	foreach (e; result)
	{
		writeln(e[0], " ", e[1], " ", e[2], " ", e[3]);
	}
	stdout.flush();
}