#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 1e3 + 7;
int n, a[N], c[N];
char s[N];
vector<int> l, r, v;
int last[N], g[N], to[N];
bool calc() {
  for (int i = 1; i <= n * 2; i++) g[i] = 0;
  for (int i = 1; i <= n; i++) last[i] = 0;
  for (int i = 1; i <= n * 2; i++) {
    if (!last[c[i]])
      last[c[i]] = i;
    else
      to[last[c[i]]] = i, to[i] = last[c[i]];
  }
  int x = 1;
  int flg = 0;
  while (x <= n * 2) {
    g[to[x]] = 1;
    x = to[x] + 1;
  }
  bool ret = 1;
  for (int i = 1; i <= n * 2 - 1; i++) {
    ret &= (g[i] == a[i]);
    if (!ret) break;
  }
  return ret;
}
vector<int> cho, rv;
void prt() {
  puts("Yes");
  for (int i = 1; i <= n * 2; i++) printf("%d ", c[i]);
}
int vis[N];
void dfs(int x) {
  if (x == n * 2 + 1) {
    if (calc()) {
      prt();
      exit(0);
    }
    return;
  }
  for (int i = 1; i <= n; i++)
    if (vis[i] <= 1) c[x] = i, vis[i]++, dfs(x + 1), vis[i]--;
}
void solve1() {
  dfs(1);
  puts("No");
}
int main() {
  srand(time(NULL));
  int st = clock();
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 1; i <= n * 2 - 1; i++) a[i] = s[i - 1] - '0';
  if (n <= 5) {
    solve1();
    return 0;
  }
  for (int i = 1; i <= n * 2; i++) {
    if (i == 1) {
      if (a[i] == 0) l.push_back(i);
    } else if (i == n * 2) {
      if (a[i - 1] == 0) r.push_back(i);
    } else {
      if (a[i - 1] == 1 && a[i] == 0)
        l.push_back(i);
      else if (a[i - 1] == 0 && a[i] == 1)
        r.push_back(i);
    }
  }
  int tot = 0;
  if (l.size()) {
    for (int i = 1; i <= l[0] - 1; i++) v.push_back(i);
    for (int i = 0; i < (int)r.size() - 1; i++)
      for (int j = r[i] + 1; j <= l[i + 1] - 1; j++) v.push_back(j);
    for (int i = r[(int)r.size() - 1] + 1; i <= n * 2; i++) v.push_back(i);
  } else {
    for (int i = 1; i <= n * 2; i++) v.push_back(i);
  }
  rv = v;
  int k = v.size();
  if (k & 1) {
    puts("No");
    return 0;
  }
  k >>= 1;
  if (k & 1) {
    for (int i = 0; i < (int)r.size() - 1; i++)
      if (l[i + 1] > r[i]) cho.push_back(i);
    int now = clock();
    bool ok = false;
    if (!cho.size()) {
      puts("No");
      return 0;
    }
    while ((double)(now - st) / CLOCKS_PER_SEC < 1.95) {
      v.clear();
      for (int i = 1; i <= n * 2; i++) c[i] = 0;
      tot = 0;
      int p = cho[rand() % cho.size()];
      bool ps1 = 0, ps2 = 0;
      for (int i = 0; i < rv.size(); i++)
        if (r[p] < rv[i] && !ps1)
          v.push_back(r[p]), ps1 = 1, i--;
        else if (l[p + 1] < rv[i] && !ps2)
          v.push_back(l[p + 1]), ps2 = 1, i--;
        else
          v.push_back(rv[i]);
      if (!ps1) v.push_back(r[p]);
      if (!ps2) v.push_back(l[p + 1]);
      for (int i = 0; i < l.size(); i++)
        if (i != p + 1) ++tot, c[l[i]] = tot;
      tot = 0;
      for (int i = 0; i < r.size(); i++)
        if (i != p) ++tot, c[r[i]] = tot;
      int k = v.size();
      for (int i = 0; i < k; i += 4) {
        ++tot;
        c[v[i]] = c[v[i + 2]] = tot;
        ++tot;
        c[v[i + 1]] = c[v[i + 3]] = tot;
      }
      bool ch = 0;
      for (int i = 1; i <= n * 2; i++)
        if (!c[i]) {
          if (ch)
            c[i] = tot, ch = 0;
          else
            ++tot, ch = 1, c[i] = tot;
        }
      if (!calc()) {
        now = clock();
        continue;
      }
      ok = 1;
      puts("Yes");
      for (int i = 1; i <= n * 2; i++) printf("%d ", c[i]);
      break;
    }
    if (!ok) puts("No");
  } else {
    for (int i = 0; i < l.size(); i++) {
      ++tot;
      c[l[i]] = c[r[i]] = tot;
    }
    for (int i = 0; i < k; i++) {
      ++tot;
      c[v[i]] = c[v[i + k]] = tot;
    }
    bool ch = 0;
    for (int i = 1; i <= n * 2; i++)
      if (!c[i]) {
        if (ch)
          c[i] = tot, ch = 0;
        else
          ++tot, ch = 1, c[i] = tot;
      }
    puts("Yes");
    for (int i = 1; i <= n * 2; i++) printf("%d ", c[i]);
  }
}
