#include <bits/stdc++.h>
using namespace std;
void fail() {
  cout << "No" << endl;
  exit(0);
}
int64_t in(int64_t x) { return 2 * x; }
int64_t out(int64_t x) { return 2 * x + 1; }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int64_t n;
  cin >> n;
  string s;
  cin >> s;
  s = "1" + s + "1";
  int64_t a[2 * n], b[2 * n];
  set<int64_t> cnt_a[4], cnt_b[4];
  for (int64_t i = 1; i <= 2 * n; i++) {
    int64_t A = s[i - 1] == '1';
    int64_t B = s[i] == '1';
    a[i - 1] = 2 * A + B;
    b[i - 1] = 2 * B + A;
    cnt_a[a[i - 1]].insert(i - 1);
    cnt_b[b[i - 1]].insert(i - 1);
  }
  int64_t sz = 1;
  int64_t color[2 * n];
  fill(color, color + 2 * n, 0);
  int64_t pair[2 * n];
  for (int64_t i = 0; i < 4; i++) {
    for (auto it = begin(cnt_a[i]); it != end(cnt_a[i]);) {
      if (color[*it]) {
        it = cnt_a[i].erase(it);
      } else {
        it++;
      }
    }
    for (auto it = begin(cnt_b[i]); it != end(cnt_b[i]);) {
      if (color[*it]) {
        it = cnt_b[i].erase(it);
      } else {
        it++;
      }
    }
    if (cnt_a[i].size() != cnt_b[i].size()) {
      fail();
    }
    vector<int64_t> inter;
    set_intersection(begin(cnt_a[i]), end(cnt_a[i]), begin(cnt_b[i]),
                     end(cnt_b[i]), back_inserter(inter));
    vector<int64_t> cura, curb;
    for (auto it : inter) {
      cura.push_back(it);
      curb.push_back(it);
      cnt_a[i].erase(it);
      cnt_b[i].erase(it);
    }
    if (inter.size() > 1) {
      rotate(begin(cura), begin(cura) + 1, end(cura));
      cura.pop_back();
      curb.pop_back();
    } else if (inter.size() == 1) {
      fail();
    }
    for (auto it : cnt_a[i]) {
      cura.push_back(it);
    }
    for (auto it : cnt_b[i]) {
      curb.push_back(it);
    }
    for (int64_t i = 0; i < cura.size(); i++) {
      pair[cura[i]] = curb[i];
      pair[curb[i]] = cura[i];
      color[cura[i]] = color[curb[i]] = sz++;
      cerr << cura[i] << ' ' << curb[i] << ' ' << color[cura[i]] << endl;
      cerr << a[cura[i]] << ' ' << b[curb[i]] << endl;
    }
  }
  if (color[0] == color[2 * n - 1]) {
    bool res = false;
    for (int64_t i = 1; i < 2 * n - 1; i++) {
      if (a[i] == a[0]) {
        swap(color[0], color[i]);
        res = true;
        break;
      }
      if (a[i] == a[2 * n - 1]) {
        swap(color[2 * n - 1], color[i]);
        res = true;
        break;
      }
    }
    if (!res) {
      fail();
    }
  }
  int64_t next[4 * n];
  fill(next, next + 4 * n, -2);
  for (int64_t i = 0; i < 2 * n; i++) {
    if (s[i + 1] == '1' && i + 1 < 2 * n) {
      next[out(i)] = in(i + 1);
    }
    if (s[i] == '1') {
      next[in(i)] = out(pair[i]);
    }
    if (i + 1 == 2 * n) {
      next[out(i)] = -1;
    }
  }
  vector<vector<int64_t>> cycles;
  vector<int64_t> path;
  int64_t used[4 * n];
  memset(used, 0, sizeof(used));
  for (int64_t i = 0; i < 4 * n; i++) {
    if (used[i]) {
      continue;
    }
    vector<int64_t> cyc;
    int64_t j = i;
    while (j >= 0 && !used[j]) {
      used[j] = true;
      cyc.push_back(j);
      j = next[j];
    }
    if (j == -1) {
      path = cyc;
    } else if (j >= 0) {
      cycles.push_back(cyc);
    }
  }
  for (auto it : color) {
    cerr << it << ' ';
  }
  cerr << endl;
  for (auto it : path) {
    cerr << "(" << it / 2 << "," << it % 2 << ")" << ' ';
  }
  cerr << endl << cycles.size() << endl;
  for (auto it : cycles) {
    for (auto jt : it) {
      cerr << "(" << jt / 2 << "," << jt % 2 << ")" << ' ';
    }
    cerr << endl;
  }
  for (auto it : cycles) {
    int64_t last = path.back();
    int64_t last1 = path[path.size() - 2];
    int64_t start = 0;
    while (it[start] % 2 != last1 % 2) {
      start = (start + 1) % it.size();
    }
    cerr << it[start] / 2 << ' ' << it[start] % 2 << endl;
    swap(color[path[path.size() - 2] / 2], color[it[start] / 2]);
    path.pop_back();
    for (int64_t i = 1; i - 1 < it.size(); i++) {
      path.push_back(it[(start + i) % it.size()]);
    }
    path.push_back(last);
  }
  for (auto it : path) {
    cerr << "(" << it / 2 << "," << it % 2 << ")" << ' ';
  }
  cout << "Yes" << endl;
  for (auto it : color) {
    cout << it << ' ';
  }
  cout << endl;
  return 0;
}
