/**
 *    author:  tourist
 *    created: 20.12.2019 15:16:25       
**/
#undef _GLIBCXX_DEBUG

#include <bits/stdc++.h>

using namespace std;

vector<int> SolveSmall(string s) {
  int n = (int) s.size() / 2;
  vector<int> a(2 * n);
  iota(a.begin(), a.begin() + n, 0);
  iota(a.begin() + n, a.end(), 0);
  sort(a.begin(), a.end());
  string t(2 * n, '1');
  vector<int> go(n);
  do {
    fill(t.begin(), t.end() - 1, '0');
    fill(go.begin(), go.end(), 0);
    for (int i = 0; i < 2 * n; i++) {
      go[a[i]] ^= i;
    }
    int i = -1;
    while (i != 2 * n - 1) {
      if (i >= 0) {
        t[i] = '1';
      }
      i++;
      i ^= go[a[i]];
    }
    if (s == t) {
      return a;
    }
  } while (next_permutation(a.begin(), a.end()));
  return vector<int>();
}

vector<int> SolveWithAtMostTwoZeros(string s) {
  int n = (int) s.size() / 2;
  vector<int> add(1, 0);
  string t = "";
  for (int i = 0; i < 2 * n; i++) {
    if (s.substr(i, 6) == "111111") {
      add.back() += 1;
      i += 3;
      continue;
    }
    t += s[i];
    add.push_back(0);
  }
  vector<int> got = SolveSmall(t);
  if (got.empty()) {
    return vector<int>();
  }
  vector<int> ret;
  int ptr = (int) t.size() / 2;
  for (int i = 0; i < (int) got.size(); i++) {
    ret.push_back(got[i]);
    for (int j = 0; j < add[i]; j++) {
      ret.push_back(ptr);
      ret.push_back(ptr + 1);
      ret.push_back(ptr);
      ret.push_back(ptr + 1);
      ptr += 2;
    }
  }
  return ret;
}

vector<int> SolveWithoutDoubleZeros(string s) {
  int n = (int) s.size() / 2;
  int start = 1;
  for (int i = 0; i < 2 * n; i++) {
    if (s[i] == '1' && s[(i + 1) % (2 * n)] == '1') {
      start = i;
      break;
    }
  }
  int x = (start + 2 * n - 1) % (2 * n);
  int y = (start + 1) % (2 * n);
  while (x != start && s[x] == '1') {
    x = (x + 2 * n - 1) % (2 * n);
  }
  while (y != start && s[y] == '1') {
    y = (y + 1) % (2 * n);
  }
  if (x == start) {
    return SolveWithAtMostTwoZeros(s);
  }
  vector<int> add(1, 0);
  string t = "";
  for (int i = 0; i < 2 * n; i++) {
    if (s[i] == '0' && i != x && i != y) {
      add.back() += 1;
      i += 1;
      continue;
    }
    t += s[i];
    add.push_back(0);
  }
  vector<int> got = SolveWithAtMostTwoZeros(t);
  if (got.empty()) {
    return vector<int>();
  }
  vector<int> ret;
  int ptr = (int) t.size() / 2;
  for (int i = 0; i <= (int) got.size(); i++) {
    for (int j = 0; j < add[i]; j++) {
      ret.push_back(ptr);
      ret.push_back(ptr);
      ptr += 1;
    }
    if (i < (int) got.size()) {
      ret.push_back(got[i]);
    }
  }
  return ret;
}

vector<int> Solve(string s) {
  vector<int> add;
  string t = "";
  for (char c : s) {
    if (c == '0' && !t.empty() && t.back() == '0') {
      add.back() += 1;
      continue;
    }
    t += c;
    add.push_back(0);
  }
  if (t.size() % 2 == 1) {
    return vector<int>();
  }
  vector<int> got = SolveWithoutDoubleZeros(t);
  if (got.empty()) {
    return vector<int>();
  }
  vector<int> ret;
  int ptr = (int) t.size();
  for (int i = 0; i < (int) got.size(); i++) {
    ret.push_back(got[i]);
    for (int j = 0; j < add[i]; j++) {
      ret.push_back(ptr / 2);
      ptr += 1;
    }
  }
  return ret;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  s += "1";
  vector<int> ret = Solve(s);
  if (ret.empty()) {
    cout << "No" << '\n';
  } else {
    cout << "Yes" << '\n';
    for (int i = 0; i < (int) ret.size(); i++) {
      if (i > 0) {
        cout << " ";
      }
      cout << ret[i] + 1;
    }
    cout << '\n';
  }
  return 0;
}
