#include <bits/stdc++.h>
using namespace std;
int N;
char S[200200];
int ans[200200], nxt[200200], cnt, pos[100100][2];
bool chk[200200];
vector<pair<int, int> > c;
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;
  }
  for (int i = 0; i <= 2 * N; i++)
    if (!chk[i] && S[i] == '1') {
      int x = i, d1 = -1, d2 = -1;
      while (!chk[x]) {
        chk[x] = 1;
        if (x < 2 * N) {
          if (S[x] == '1' && S[x + 1] == '1')
            d1 = ans[x + 1];
          else
            d2 = ans[x + 1];
        }
        x = nxt[x];
      }
      c.push_back({d1, d2});
    }
  sort(c.begin(), c.end(), [](pair<int, int>& a, pair<int, int>& b) {
    int p = a.first == -1 || a.second == -1;
    int q = b.first == -1 || b.second == -1;
    if (p && q) return a < b;
    return p > q;
  });
  while (c.size() >= 2) {
    auto P = c.back();
    c.pop_back();
    auto Q = c.back();
    int p, q;
    if (P.second != -1 && Q.second != -1) {
      p = P.second;
      q = Q.second;
    } else if (P.first != -1 && Q.first != -1) {
      p = P.first;
      q = Q.first;
    } else {
      puts("No");
      return 0;
    }
    if (c.back().first == -1 && P.first != -1) c.back().first = P.first;
    if (c.back().second == -1 && P.second != -1) c.back().second = P.second;
    {
      int a = pos[p][0], b = pos[p][1], c = pos[q][0], d = pos[q][1];
      if (S[a] == '0') swap(a, b);
      if (S[c] == '0') swap(c, d);
      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;
}
