using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder
{

    class Program
    {
        static void Main()
        {
            Solve();

            Console.ReadKey();
        }

        static void Solve()
        {
            int H; int W;
            Multi(out H, out W);
            var a = new int[H][];
            for (int i = 0; i < H; i++)
            {
                a[i] = GetIntArray();
            }
            var N = 0;
            List<string> str = new List<string>();
            for (int i = 0; i < H - 1; i++)
            {
                for (int j = 0; j < W - 1; j++)
                {
                    if (a[i][j] % 2 == 1)
                    {
                        a[i][j]--;
                        a[i][j + 1]++;
                        N++;
                        str.Add((i+1) + " " + (j+1) + " " + (i+1) + " " + (j + 2));
                    }
                }
                if (a[i][W - 1] % 2 == 1)
                {
                    a[i][W - 1]--;
                    a[i + 1][W - 1]++;
                    N++;
                    str.Add((i+1) + " " + W + " " + (i + 2) + " " + (W));
                }
            }
            for (int j = 0; j < W - 1; j++)
            {
                if (a[H - 1][j] % 2 == 1)
                {
                    a[H - 1][j]--;
                    a[H - 1][j + 1]++;
                    N++;
                    str.Add(H + " " + (j+1) + " " + H + " " + (j + 2));
                }
            }

            Console.WriteLine(N);
            for(int i = 0; i < N; i++)
            {
                Console.WriteLine(str[i]);
            }

        }



        static public string GetStr() { return Console.ReadLine(); }
        static public int GetInt() { return int.Parse(Console.ReadLine()); }
        static public long GetLong() { return long.Parse(Console.ReadLine()); }
        static public string[] GetStrArray() { return Console.ReadLine().Split(' '); }
        static public int[] GetIntArray() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
        static public long[] GetLongArray() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
        static public List<double> GetDoubleList() { return Console.ReadLine().Split(' ').Select(double.Parse).ToList(); }
        static public void WriteObjects<T>(IEnumerable<T> values) { foreach (var o in values) { Console.Write(o + " "); } }

        static bool eq<T, U>() => typeof(T).Equals(typeof(U));
        static T ct<T, U>(U a) => (T)Convert.ChangeType(a, typeof(T));
        static T cv<T>(string s) => eq<T, int>() ? ct<T, int>(int.Parse(s))
                           : eq<T, long>() ? ct<T, long>(long.Parse(s))
                           : eq<T, double>() ? ct<T, double>(double.Parse(s))
                           : eq<T, char>() ? ct<T, char>(s[0])
                                             : ct<T, string>(s);
        static void Multi<T>(out T a) => a = cv<T>(GetStr());
        static void Multi<T, U>(out T a, out U b)
        {
            var ar = GetStrArray(); a = cv<T>(ar[0]); b = cv<U>(ar[1]);
        }
        static void Multi<T, U, V>(out T a, out U b, out V c)
        {
            var ar = GetStrArray(); a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]);
        }
    }
}

Measured memory_bytes: 29076