#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1;
vector<pair<char, int> > v;
map<int, int> mp1, mp2;
int arr[105][105];
int main() {
  int x, y, z, n = 0, m = 0, c = 0, lo = 2, mn = 1e9, mx = 0;
  char ch;
  cin >> x >> y;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < y; j++) {
      cin >> arr[i][j];
    }
  }
  if (y > x) {
    for (int i = 0; i < x; i++) {
      for (int j = 0; j < y; j++) {
        mn = min(mn, arr[i][j]);
      }
      if (mn != 0) {
        for (int k = 0; k < y; k++) {
          arr[i][k] -= mn;
        }
        while (mn--) {
          v.push_back(make_pair('r', i + 1));
        }
      }
      mn = 1e9;
    }
    mn = 1e9;
    for (int i = 0; i < y; i++) {
      mn = 1e9;
      for (int j = 0; j < x; j++) {
        mn = min(mn, arr[j][i]);
      }
      if (mn != 0) {
        for (int k = 0; k < x; k++) {
          arr[k][i] -= mn;
        }
        while (mn--) {
          v.push_back(make_pair('c', i + 1));
        }
      }
      mn = 1e9;
    }
  } else {
    mn = 1e9;
    for (int i = 0; i < y; i++) {
      mn = 1e9;
      for (int j = 0; j < x; j++) {
        mn = min(mn, arr[j][i]);
      }
      if (mn != 0) {
        for (int k = 0; k < x; k++) {
          arr[k][i] -= mn;
        }
        while (mn--) {
          v.push_back(make_pair('c', i + 1));
        }
      }
      mn = 1e9;
    }
    for (int i = 0; i < x; i++) {
      for (int j = 0; j < y; j++) {
        mn = min(mn, arr[i][j]);
      }
      if (mn != 0) {
        for (int k = 0; k < y; k++) {
          arr[i][k] -= mn;
        }
        while (mn--) {
          v.push_back(make_pair('r', i + 1));
        }
      }
      mn = 1e9;
    }
  }
  bool f = 0;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < y; j++) {
      if (arr[i][j] != 0) {
        f = 1;
        i = x;
        break;
      }
    }
  }
  if (f == 1) {
    cout << -1 << endl;
  } else {
    cout << v.size() << endl;
    for (int i = 0; i < v.size(); i++) {
      if (v[i].first == 'r') {
        cout << "row ";
      } else {
        cout << "col ";
      }
      cout << v[i].second << endl;
    }
  }
  return 0;
}
