#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n;
	string s;
	cin >> n >> s;
	s.insert(0, "1");
	s += s;
	n += n;
	int l = 0;
	for (int i = 0; i < n; i++)
		if (s[i] == '1' && s[i + 1] == '1')
			l++;
	int a1 = 0, a2, a3, a4;
	if (l % 4 == 2) {
		a1 = s.find("011");
		if (a1 != -1)
			a3 = s.find("011", a1 + 1);
		if (a1 != -1 && a3 != -1 && a3 < n) {
			a2 = s.find('0', ++a1);
			a4 = s.find('0', ++a3);
			s = (s.substr(0, a2) + s.substr(a3, a4 - a3)).substr(0, a2 + a4 - a3 - 3) + s.substr(a2, a3 - a2 - 1) + s.substr(a4);
			n -= 4;
			s = s.substr(a1, a1 + n) + s.substr(a1);
		}
		else l++;
	}
	if (l % 2) {
		cout << "No" << endl;
		return 0;
	}
	cout << "Yes\n";
	vector<int> v;
	int m = 0, k = 0, e = 0, f, g = 0, h = -1;
	for (int i = 0; i < n; i++) {
		if (s[i] != s[i + 1]) {
			if (s[i] == '1')
				v.push_back(k = ++m);
			else {
				v.push_back(k);
				if (!k) h = i - a1;
			}
			continue;
		}
		if (s[i] == '0') {
			if (e) v.push_back(e), e = 0;
			else v.push_back(e = ++m);
			continue;
		}
		if (g)
			v.push_back(f + g % 2);
		else v.push_back(f = ++m), m++;
		g++, g %= 4;
	}
	if (h >= 0) v[h] = k;
	if (l % 4) {
		vector<int> w;
		w.push_back(++m);
		w.insert(w.end(), v.begin() + (a4 - a3 - 2), v.begin() + (a4 - a1 - 4));
		w.push_back(m + 1);
		w.push_back(m);
		w.insert(w.end(), v.begin(), v.begin() + (a4 - a3 - 2));
		w.push_back(m + 1);
		w.insert(w.end(), v.begin() + (a4 - a1 - 4), v.end());
		v.clear();
		v.insert(v.end(), w.end() - a1, w.end());
		v.insert(v.end(), w.begin(), w.end() - a1);
	}
	for (auto i : v)
		cout << i << ' ';
	cout << endl;
	return 0;
}
