#include <bits/stdc++.h>
using namespace std;
int x[100][100];
int v[100];
int r, ba = 0;
int main() {
  cin >> r;
  for (long long i = 0; i < r; i++) {
    for (long long j = 0; j < r; j++) cin >> x[i][j];
  }
  for (long long i = 0; i < r; i++) {
    for (long long j = 0; j < r; j++) {
      if (x[i][j] <= 1) v[j]++;
    }
  }
  for (long long i = 0; i < r; i++) {
    if (v[i] == r) ba++;
  }
  cout << ba << endl;
  for (long long i = 0; i < r; i++) {
    if (v[i] == r) cout << i + 1 << " ";
  }
}
