import sys

sys.setrecursionlimit(100000)


def dfs(v, t, cnt, goal, color, links, ans):
    # print(v, t, ans)
    if v == t:
        if cnt == goal:
            ans[v - 1] = color
            return True
        else:
            return False
    memo_u = 0
    if v:
        memo_u = ans[v - 1]
        if not memo_u:
            ans[v - 1] = color
    memo_v = ans[v]
    if not memo_v:
        color += 1
        ans[v] = color
    # print(ans)
    for l in links[v]:
        if ans[l - 1] and ans[l - 1] != ans[v]:
            continue
        res = dfs(l, t, cnt + 1, goal, color, links, ans)
        if res:
            return True
    ans[v - 1] = memo_u
    ans[v] = memo_v
    return False


n = int(input())
s = input()
to_, from_ = [set(), set()], [set(), set()]
sl = [1] + list(map(int, s)) + [1]
cnt = sum(sl) - 1
for i, (pc, c) in enumerate(zip(sl, sl[1:])):
    if pc:
        from_[c].add(i)
    if c:
        to_[pc].add(i + 1)
# print(from_, to_)
links = [None] * (2 * n)
for f, t in zip(from_, to_):
    for l in f:
        links[l] = {k for k in t if k - 1 != l}
# print(links)
ans = [0] * (n * 2)
res = dfs(0, 2 * n, 0, cnt, 0, links, ans)
if res:
    print('Yes')
    mx = max(ans)
    if mx != n:
        mx = mx * 2 + 1
        for i, v in enumerate(ans):
            if v == 0:
                ans[i] = mx // 2
                mx += 1
    print(*ans)
else:
    print('No')
