#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i ++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i ++)
#define MP make_pair

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int MOD = 998244353;

int n;
string s;
vector<int> hv[2][2];
int ans[200005], cnt;

int main()
{
	cin >> n >> s;
	s = "1" + s + "1";
	rep(i, 2 * n) hv[s[i] - '0'][s[i + 1] - '0'].push_back(i);
	if(hv[1][1].size() % 2 != 0) {
		cout << "No" << endl;
		return 0;
	}
	rep(i, hv[1][0].size()) ans[hv[1][0][i]] = ans[hv[0][1][i]] = cnt ++;
	rep(i, hv[0][0].size()) {
		ans[hv[0][0][i]] = cnt;
		if(i & 1) cnt ++;
	}
	if(hv[1][1].size() % 4 == 0) {
		rep(i, hv[1][1].size()) {
			ans[hv[1][1][i]] = cnt + (i & 1);
			if((i & 3) == 3) cnt += 2;
		}
		cout << "Yes" << endl;
		rep(i, 2 * n) cout << ans[i] + 1 << ' ';
		return 0;
	}
	int pos = -1;
	for(int i = 1; i < hv[1][0].size(); i ++) if(hv[0][1][i - 1] + 1 < hv[1][0][i]) {
		pos = i;
		break;
	}
	if(pos == -1 || hv[1][1][0] > hv[0][1][pos - 1] && hv[1][1][hv[1][1].size() - 1] < hv[1][0][pos]) {
		cout << "No" << endl;
		return 0;
	}
	swap(ans[hv[0][1][pos - 1]], ans[hv[0][1][pos]]);
	int ct = 0, tot = n;
	rep(i, hv[1][1].size()) {
		if(i + 1 < hv[1][1].size() && hv[1][1][i + 1] == hv[0][1][pos - 1] + 1 ||
		hv[1][1][0] == hv[0][1][pos - 1] + 1 && hv[1][1][i] == hv[1][0][pos] - 1) {
			ans[hv[1][1][i]] = ans[hv[1][1][i + 1]] = -- tot;
			i ++;
			continue;
		}
		ans[hv[1][1][i]] = cnt + (ct & 1);
		if((ct & 3) == 3) cnt += 2;
		ct ++;
	}
	cout << "Yes" << endl;
	rep(i, 2 * n) cout << ans[i] + 1 << ' ';
	return 0;
}