#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());
  do {
    vector<bool> walked(2 * n - 1, false);
    int i = -1;
    while (i != 2 * n - 1) {
      if (i >= 0) {
        walked[i] = true;
      }
      i++;
      for (int j = 0; j < 2 * n; j++) {
        if (i != j && a[i] == a[j]) {
          i = j;
          break;
        }
      }
    }
    string t = "";
    for (int j = 0; j < 2 * n - 1; j++) {
      t += (walked[j] ? "1" : "0");
    }
    t += "1";
    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;
}
