import java.io.*;
import java.math.*;
import java.util.*;

import static java.util.Arrays.fill;
import static java.lang.Math.*;
import static java.util.Arrays.sort;
import static java.util.Collections.sort;

public class Main {
	static int mod = 1000000007;
	static InputReader in = new InputReader(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static int gcd(int a,int b)
	{
		if(b==0)
			return a;
		return gcd(b, a%b);
	}
	
	static class Pair
	{
		int a,b,c,d;
		Pair(int a,int b,int c,int d)
		{
			this.a=a;
			this.b=b;
			this.c=c;
			this.d=d;
		}
	}
	
	public static void main(String[] args) {

		
		int h=in.nextInt();
		int w=in.nextInt();
		int[][] a=new int[h+1][w+1];
		for(int i=1;i<=h;i++)
		{
			for(int j=1;j<=w;j++)
			{
				a[i][j]=in.nextInt();
			}
		}
		ArrayList<Pair> list=new ArrayList<>();
		for(int i=1;i<=h;i++)
		{
			for(int j=1;j<w;j++)
			{
				if(a[i][j]%2==1)
				{
					list.add(new Pair(i, j, i, j+1));
					a[i][j+1]++;
					a[i][j]--;
				}
			}
		}
		for(int i=1;i<h;i++)
		{
			if(a[i][w]%2==1)
			{
				list.add(new Pair(i, w, i+1, w));
				a[i][w]--;
				a[i+1][w]++;
			}
		}
		out.println(list.size());
		for(Pair p : list)
		{
			out.println(p.a+" "+p.b+" "+p.c+" "+p.d);
		}
		out.close();

	}

	static class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;

		public InputReader(InputStream st) {
			this.stream = st;
		}

		public int read() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}

	private static void tr(Object... o) {
		if (!(System.getProperty("ONLINE_JUDGE") != null))
			System.out.println(Arrays.deepToString(o));
	}
}




Measured memory_bytes: 47704