#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007

struct Bipartite_Matching {
  vector< vector< int > > G;
  vector< int > match, alive, used;
  int timestamp;

  Bipartite_Matching(int n) {
    timestamp = 0;
    G.resize(n);
    alive.assign(n, 1);
    used.assign(n, 0);
    match.assign(n, -1);
  }

  void add_edge(int u, int v) {
    G[u].push_back(v);
    G[v].push_back(u);
  }

  bool dfs(int v) {
    used[v] = timestamp;
    for (int u : G[v]) {
      int w = match[u];
      if(alive[u] == 0) continue;
      if(w == -1 || (used[w] != timestamp && dfs(w))) {
        match[v] = u;
        match[u] = v;
        return true;
      }
    }
    return false;
  }

  int bipartite_matching() {
    int ret = 0;
    rep(i, G.size()) {
      if(alive[i] == 0) continue;
      if(match[i] == -1) {
        ++timestamp;
        ret += dfs(i);
      }
    }
    return ret;
  }
};

struct Lexicographically_Matching : Bipartite_Matching {
  Lexicographically_Matching(int n) : Bipartite_Matching(n) {}

  int back(int k) {
    match[match[k]] = -1;
    match[k] = -1;
    ++timestamp;
    dfs(k);
    return match[k];
  }

  void decide(int k) {
    alive[match[k]] = 0;
    alive[k] = 0;
  }
};


int N;
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N;
  Lexicographically_Matching bip((N-1)*2);
  rep(i, N-1) {
    rep(j, N-1) {
      int x;
      cin >> x;
      if (x) bip.add_edge(i, j+N-1);
    }
  }
  if (bip.bipartite_matching() < N-1) {
    cout << "no\n";
    return 0;
  }
  cout << "yes\n";
  rep(i, N-1) {
    bip.decide(bip.back(i+N-1));
    cout << bip.match[i+N-1]+1 << "\n";
  }
  return 0;
}