#include <bits/stdc++.h>
using namespace std;
int N;
char S[200200];
int ans[200200], nxt[200200], cnt, pos[100100][2];
bool chk[200200];
int Pr[200200];
int find(int x) {
  if (Pr[x] != x) Pr[x] = find(Pr[x]);
  return Pr[x];
}
int main() {
  scanf("%d", &N);
  scanf("%s", S + 1);
  S[0] = S[2 * N] = '1';
  stack<pair<int, int> > s;
  nxt[2 * N] = 0;
  pos[0][0] = 0;
  pos[0][1] = 2 * N + 1;
  for (int i = 1; i <= 2 * N; i++) {
    int a = S[i - 1] - '0';
    int b = S[i] - '0';
    int c = a * 2 + b;
    if (c == 0 || c == 3) {
      if (!s.empty() && s.top().first == c) {
        ans[i] = ans[s.top().second] = ++cnt;
        nxt[i - 1] = s.top().second;
        nxt[s.top().second - 1] = i;
        pos[cnt][0] = i;
        pos[cnt][1] = s.top().second;
        s.pop();
      } else
        s.push({c, i});
    } else {
      if (!s.empty() && s.top().first == 3 - c) {
        ans[i] = ans[s.top().second] = ++cnt;
        nxt[i - 1] = s.top().second;
        nxt[s.top().second - 1] = i;
        pos[cnt][0] = i;
        pos[cnt][1] = s.top().second;
        s.pop();
      } else
        s.push({c, i});
    }
  }
  if (!s.empty()) {
    puts("No");
    return 0;
  }
  vector<int> d1, d2;
  for (int i = 0; i <= 2 * N; i++)
    if (!chk[i] && S[i] == '1') {
      int x = i;
      while (!chk[x]) {
        chk[x] = 1;
        Pr[x] = i;
        if (x < 2 * N) {
          if (S[x] == '1' && S[x + 1] == '1')
            d1.push_back(ans[x + 1]);
          else
            d2.push_back(ans[x + 1]);
        }
        x = nxt[x];
      }
    }
  for (auto v : {d1, d2}) {
    while (v.size() >= 2) {
      auto p = v.back();
      v.pop_back();
      auto q = v.back();
      if (p == q) continue;
      {
        int a = pos[p][0], b = pos[p][1], c = pos[q][0], d = pos[q][1];
        if (a > b) swap(a, b);
        if (c > d) swap(c, d);
        if (S[a] == '0') swap(a, b);
        if (S[c] == '0') swap(c, d);
        if (S[a] == '1' && S[b] == '1') {
          if (find(a - 1) != find(c - 1) || find(a) != find(c)) {
            Pr[find(c - 1)] = find(a - 1);
            Pr[find(c)] = find(a);
            pos[p][0] = a;
            pos[p][1] = d;
            pos[q][0] = b;
            pos[q][1] = c;
            ans[a] = ans[d] = p;
            ans[b] = ans[c] = q;
          } else if (find(a - 1) != find(c) || find(a) != find(c - 1)) {
            Pr[find(c - 1)] = find(a);
            Pr[find(c)] = find(a - 1);
            pos[p][0] = a;
            pos[p][1] = c;
            pos[q][0] = b;
            pos[q][1] = d;
            ans[a] = ans[c] = p;
            ans[b] = ans[d] = q;
          }
        } else {
          if (S[a] == '1') {
            Pr[find(c - 1)] = find(a);
            Pr[find(c)] = find(a);
            Pr[find(d - 1)] = find(a);
            Pr[find(d)] = find(a);
          } else {
            Pr[find(c - 1)] = find(a - 1);
            Pr[find(c)] = find(a - 1);
            Pr[find(d - 1)] = find(a - 1);
            Pr[find(d)] = find(a - 1);
          }
          pos[p][0] = b;
          pos[p][1] = c;
          pos[q][0] = a;
          pos[q][1] = d;
          ans[b] = ans[c] = p;
          ans[a] = ans[d] = q;
        }
      }
    }
  }
  for (int i = 1; i <= N; i++) {
    int p = pos[i][0], q = pos[i][1];
    nxt[p - 1] = q;
    nxt[q - 1] = p;
  }
  int x = 0;
  while (1) {
    x = nxt[x];
    S[x] = '0';
    if (x == 2 * N) break;
  }
  for (int i = 1; i < 2 * N; i++)
    if (S[i] == '1') {
      puts("No");
      return 0;
    }
  puts("Yes");
  for (int i = 1; i <= 2 * N; i++) {
    printf("%d%c", ans[i], i < 2 * N ? ' ' : '\n');
  }
  return 0;
}
