#include <bits/stdc++.h>

using namespace std;

template< typename T >
struct edge {
  int src, to;
  T cost;

  edge(int to, T cost) : src(-1), to(to), cost(cost) {}

  edge(int src, int to, T cost) : src(src), to(to), cost(cost) {}

  edge &operator=(const int &x) {
    to = x;
    return *this;
  }

  operator int() const { return to; }
};

template< typename T >
using Edges = vector< edge< T > >;
template< typename T >
using WeightedGraph = vector< Edges< T > >;
using UnWeightedGraph = vector< vector< int > >;
template< typename T >
using Matrix = vector< vector< T > >;


template< typename G >
struct LowLink {
  const G &g;
  vector< int > used, ord, low;
  vector< int > articulation;
  vector< pair< int, int > > bridge;

  LowLink(const G &g) : g(g), used(g.size()), ord(g.size()), low(g.size()) {}

  int build(int idx = 0, int k = 0, int par = -1) {
    used[idx] = true;
    ord[idx] = k++;
    low[idx] = ord[idx];
    bool is_articulation = false;
    int cnt = 0, ordmax = k;
    for(auto &to : g[idx]) {
      if(!used[to]) {
        ++cnt;
        ordmax = build(to, ordmax, idx);
        low[idx] = min(low[idx], low[to]);
        is_articulation |= ~par && low[to] >= ord[idx];
        if(ord[idx] < low[to]) bridge.emplace_back(idx, to);
      } else if(to != par) {
        low[idx] = min(low[idx], ord[to]);
      }
    }
    is_articulation |= par == -1 && cnt > 1;
    if(is_articulation) articulation.push_back(idx);
    return ordmax;
  }
};


int main() {
  int V, E;
  scanf("%d %d", &V, &E);
  UnWeightedGraph g(V);
  for(int i = 0; i < E; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  LowLink< UnWeightedGraph > lowlink(g);
  lowlink.build();
  sort(lowlink.articulation.begin(), lowlink.articulation.end());
  for(auto &v : lowlink.articulation) printf("%d\n", v);
}


#include <bits/stdc++.h>
using namespace std;
int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<int>> a(H, vector<int>(W));
  for (int i = 0; i < H; i++){
    for (int j = 0; j < W; j++){
      cin >> a[i][j];
    }
  }
  vector<tuple<int, int, int, int>> op;
  for (int i = 0; i < H; i++){
    for (int j = 0; j < W - 1; j++){
      if (a[i][j] % 2 == 1){
        a[i][j]--;
        a[i][j + 1]++;
        op.push_back(make_tuple(i + 1, j + 1, i + 1, j + 2));
      }
    }
  }
  for (int i = 0; i < H - 1; i++){
    if (a[i][W - 1] % 2 == 1){
      a[i][W - 1]--;
      a[i + 1][W - 1]++;
      op.push_back(make_tuple(i + 1, W, i + 2, W));
    }
  }
  int N = op.size();
  cout << N << endl;
  for (int i = 0; i < N; i++){
    cout << get<0>(op[i]) << ' ' << get<1>(op[i]) << ' ' << get<2>(op[i]) << ' ' << get<3>(op[i]) << endl;
  }
}