//ΔAPC001G
#include<iostream>
#include<cstdio>
#include<fstream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<bitset>
#include<cmath>
#include<cstring>
#include<cstdlib>
using namespace std;
typedef long long LL;
typedef double DB;
const int N = 222222;
int n,q,a[N],b[N];
string s;
void ans(){
	int i,x=0,y=0;
	for(i=1;i<=n;i=i+1){
		if(a[i]&&a[i-1]&&!b[i]){
			if(x){
				if(y)
					b[i]=q,x=0,y=0;
				else
					b[i]=q-1,x=1,y=1;
			}
			else
				b[i]=++q,x=y,y^=1;
		}
	}
	cout<<"Yes\n";
	for(i=1;i<=n;i=i+1)
		cout<<b[i]<<' ';
	exit(0);
}
int main()
{
	int i,x,y,z,w,r;
	cin>>n>>s;
	n=n+n;
	for(i=1;i<n;i=i+1)
		a[i]=s[i-1]-'0';
	a[0]=1,a[n]=1;
	x=0;
	for(i=1;i<=n;i=i+1){
		if(!a[i]&&!a[i-1]){
			if(x)
				b[i]=q,x=0;
			else
				b[i]=++q,x=i;
		}
	}
	if(x){
		cout<<"No";
		return 0;
	}
	x=0,r=0;
	for(i=1;i<=n;i=i+1){
		if(a[i]^a[i-1]){
			if(x)
				b[i]=q,x=0;
			else
				b[i]=++q,x=i;
		}
		if(a[i]&&a[i-1])
			r++;
	}
	if(r&1){
		cout<<"No";
		return 0;
	}
	if(!(r&3))
		ans();
	x=0,y=0,z=0,w=0;
	for(i=1;i<=n;i=i+1){
		if(a[i]&&a[i-1]){
			if(!x)
				x=i;
			if(y&&!z)
				z=i;
		}
		if(a[i]^a[i-1]){
			if(x&&!y)
				y=i;
			if(z&&!w)
				w=i;
		}
	}
	if(w){
		x=y-1;
		swap(b[y],b[w]);
		b[x]=++q,b[z]=q;
		ans();
	}
	x=0,y=0,z=0,w=0;
	for(i=1;i<=n;i=i+1){
		if(a[i]^a[i-1]){
			if(!x)
				x=i;
			if(y&&!z)
				z=i;
		}
		if(a[i]&&a[i-1]){
			if(x&&!y)
				y=i;
			if(z&&!w)
				w=i;
		}
	}
	if(w){
		y=z-1;
		swap(b[x],b[z]);
		b[y]=++q,b[w]=q;
		ans();
	}
	cout<<"No";
	return 0;
}
/*
5
110111011

*/