#include <bits/stdc++.h>
using namespace std;
long long ar[102][102];
vector<pair<char, int> > v;
int main() {
  ios_base::sync_with_stdio(false);
  ;
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 1; j <= m; ++j) {
      cin >> ar[i][j];
    }
  }
  if (n > m) {
    for (long long i = 1; i <= m; ++i) {
      long long min = 501;
      for (long long j = 1; j <= n; ++j) {
        if (ar[j][i] < min) min = ar[j][i];
      }
      for (long long j = 1; j <= n; ++j) {
        ar[j][i] -= min;
      }
      for (int k = 0; k < min; ++k) {
        v.push_back(make_pair('c', i));
      }
    }
    for (long long i = 1; i <= n; ++i) {
      long long min = 501;
      for (long long j = 1; j <= m; ++j) {
        if (ar[i][j] < min) min = ar[i][j];
      }
      for (long long j = 1; j <= m; ++j) {
        ar[i][j] -= min;
      }
      for (int k = 0; k < min; ++k) {
        v.push_back(make_pair('r', i));
      }
    }
  } else {
    for (long long i = 1; i <= n; ++i) {
      long long min = 501;
      for (long long j = 1; j <= m; ++j) {
        if (ar[i][j] < min) min = ar[i][j];
      }
      for (long long j = 1; j <= m; ++j) {
        ar[i][j] -= min;
      }
      for (int k = 0; k < min; ++k) {
        v.push_back(make_pair('r', i));
      }
    }
    for (long long i = 1; i <= m; ++i) {
      long long min = 501;
      for (long long j = 1; j <= n; ++j) {
        if (ar[j][i] < min) min = ar[j][i];
      }
      for (long long j = 1; j <= n; ++j) {
        ar[j][i] -= min;
      }
      for (int k = 0; k < min; ++k) {
        v.push_back(make_pair('c', i));
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (ar[i][j] != 0) {
        cout << "-1\n";
        return 0;
      }
    }
  }
  long long siz = v.size();
  cout << siz << "\n";
  for (int i = 0; i < siz; ++i) {
    if (v[i].first == 'r') cout << "row " << v[i].second << "\n";
    if (v[i].first == 'c') cout << "col " << v[i].second << "\n";
  }
  return 0;
}
