/+ dub.sdl:
    name "B"
    dependency "dcomp" version=">=0.7.4"
+/

import std.stdio, std.algorithm, std.range, std.conv;
import std.typecons;
// import dcomp.foundation, dcomp.scanner;
// import dcomp.container.pairingheap;

int main() {
    Scanner sc = new Scanner(stdin);
    int n;
    sc.read(n);
    string s;
    sc.read(s);
    int[] res = new int[2*n];
    int mtc = 0;
    void mt(int a, int b) {
        res[a] = res[b] = mtc;
        mtc++;
    }
    void pr() {
        writeln("Yes");
        writeln(res.map!(x => (x+1).to!string).join(" "));
    }
    if (!s.count('0')) {
        if (n % 2) {
            writeln("No");
            return 0;
        }
        foreach (i; 0..n/2) {
            mt(4*i, 4*i+2);
            mt(4*i+1, 4*i+3);
        }
        pr();
        return 0;
    }

    s ~= "1";    
    auto p = PairingHeap!(int[], "a.length < b.length")();

    int l = 0;
    while (s[l] == '1') l++;
    while (l < 2*n) {
        if (s[l] == '0') {
            l++;
            continue;
        }
        int r = l;
        while (s[r % (2*n)] == '1') r++;
        int[] v = iota(l, r+1).map!(x => x % (2*n)).array;
        p.insert(v);
//        writeln(v);
        l = r;
    }
    int[] ze;
    foreach (i; 1..2*n) {
        if (s[i-1] == '0' && s[i] == '0') ze ~= i.to!int;
    }
    if (ze.length % 2) {
        writeln("No");
        return 0;
    }
    while (ze.length) {
        mt(ze[0], ze[1]);
        ze = ze[2..$];
    }
    while (true) {
        if (p.length == 0) break;
        if (p.length == 1) {
            auto v = p.front;
            if ((v.length-2) % 4) {
                writeln("No");
                return 0;
            }
            mt(v.front, v.back);
            v = v[1..$-1];
            while (v.length) {
                mt(v[0], v[2]);
                mt(v[1], v[3]);
                v = v[4..$];
            }
            pr();
            return 0;
        }
        auto v = p.front; p.removeFront;
        auto w = p.front; p.removeFront;
//        writeln(v, " ", w);
        if (w.length == 2) {
            mt(v.back, w[0]);
            v.back = w[1];
            p.insert(v);
            continue;
        }
        if (w.length == 3 && v.length != 3) {
            mt(v[2], w[1]);
            v[2] = w[0];
            w[0] = v[0];
            w[1] = v[1];
            v = v[2..$];
            p.insert(v);
            p.insert(w);
            continue;
        }
        mt(v[1], w[1]);
        w[1] = v[0];
        v[1] = w[0];
        v = v[1..$]; w = w[1..$];
        p.insert(v);
        p.insert(w);
    }
    return 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/container/pairingheap.d */
// module dcomp.container.pairingheap;

struct PairingHeapPayload(T, alias opCmp) {
    import std.range : iota;
    import std.algorithm : swap;
    alias NP = Node*;
    static struct Node {        
        T d;
        NP head, next;
        this(T d) {
            this.d = d;
        }
    }
    NP n;
    size_t length;
    bool empty() const { return length == 0; }
    static NP merge(NP x, NP y) {
        if (!x) return y;
        if (!y) return x;
        if (opCmp(x.d, y.d)) swap(x, y);
        y.next = x.head;
        x.head = y;
        return x;
    }
    void insert(T x) {
        length++;
        if (!n) n = new Node(x);
        else n = merge(n, new Node(x));
    }
    inout(T) front() inout {
        assert(n);
        return n.d;
    }
    void removeFront() {
        assert(n);
        assert(length > 0);
        length--;
        NP x;
        NP s = n.head;
        while (s) {
            NP a, b;
            a = s; s = s.next; a.next = null;
            if (s) {
                b = s; s = s.next; b.next = null;
            }
            a = merge(a, b);
            assert(a);
            if (!x) x = a;
            else {
                a.next = x.next;
                x.next = a;
            }
        }
        n = null;
        while (x) {
            NP a = x; x = x.next;
            n = merge(a, n);
        }
    }
}

struct PairingHeap(T, alias _opCmp) {
    import std.stdio;
    import std.functional : binaryFun;
    alias opCmp = binaryFun!_opCmp;
    alias Payload = PairingHeapPayload!(T, opCmp);
    Payload* p;
    void I() { if (!p) p = new Payload(); }
    bool empty() const { return !p || p.empty(); }
    size_t length() const { return (!p) ? 0 : p.length; }
    void insert(T x) {
        I();
        assert(p);
        p.insert(x);
    }
    inout(T) front() inout {
        assert(p);
        return p.front;
    }
    void removeFront() {
        assert(p);
        p.removeFront;
    }
    void meld(PairingHeap r) {
        p.length += r.p.length;
        p.n = Payload.merge(p.n, r.p.n);
        r.p.n = null;
    }
}

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/foundation.d */
// module dcomp.foundation;
 
static if (__VERSION__ <= 2070) {
    /*
    Copied by https://github.com/dlang/phobos/blob/master/std/algorithm/iteration.d
    Copyright: Andrei Alexandrescu 2008-.
    License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
    */
    template fold(fun...) if (fun.length >= 1) {
        auto fold(R, S...)(R r, S seed) {
            import std.algorithm : reduce;
            static if (S.length < 2) {
                return reduce!fun(seed, r);
            } else {
                import std.typecons : tuple;
                return reduce!fun(tuple(seed), r);
            }
        }
    }
     
}

import core.bitop : popcnt;
static if (!__traits(compiles, popcnt(ulong.max))) {
    public import core.bitop : popcnt;
    int popcnt(ulong v) {
        return popcnt(cast(uint)(v)) + popcnt(cast(uint)(v>>32));
    }
}

bool poppar(ulong v) {
    v^=v>>1;
    v^=v>>2;
    v&=0x1111111111111111UL;
    v*=0x1111111111111111UL;
    return ((v>>60) & 1) != 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

// import dcomp.array;

 
class Scanner {
    import std.stdio : File;
    import std.conv : to;
    import std.range : front, popFront, array, ElementType;
    import std.array : split;
    import std.traits : isSomeChar, isStaticArray, isArray; 
    import std.algorithm : map;
    File f;
    this(File f) {
        this.f = f;
    }
    char[512] lineBuf;
    char[] line;
    private bool succW() {
        import std.range.primitives : empty, front, popFront;
        import std.ascii : isWhite;
        while (!line.empty && line.front.isWhite) {
            line.popFront;
        }
        return !line.empty;
    }
    private bool succ() {
        import std.range.primitives : empty, front, popFront;
        import std.ascii : isWhite;
        while (true) {
            while (!line.empty && line.front.isWhite) {
                line.popFront;
            }
            if (!line.empty) break;
            line = lineBuf[];
            f.readln(line);
            if (!line.length) return false;
        }
        return true;
    }

    private bool readSingle(T)(ref T x) {
        import std.algorithm : findSplitBefore;
        import std.string : strip;
        import std.conv : parse;
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                 
                 
                auto r = line.findSplitBefore(" ");
                x = r[0].strip.dup;
                line = r[1];
            } else static if (isStaticArray!T) {
                foreach (i; 0..T.length) {
                    bool f = succW();
                    assert(f);
                    x[i] = line.parse!E;
                }
            } else {
                FastAppender!(E[]) buf;
                while (succW()) {
                    buf ~= line.parse!E;
                }
                x = buf.data;
            }
        } else {
            x = line.parse!T;
        }
        return true;
    }
    int read(T, Args...)(ref T x, auto ref Args args) {
        if (!readSingle(x)) return 0;
        static if (args.length == 0) {
            return 1;
        } else {
            return 1 + read(args);
        }
    }
}


 
 

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/array.d */
// module dcomp.array;

 
T[N] fixed(T, size_t N)(T[N] a) {return a;}

 
 

 
struct FastAppender(A, size_t MIN = 4) {
    import std.algorithm : max;
    import std.conv;
    import std.range.primitives : ElementEncodingType;
    import core.stdc.string : memcpy;

    private alias T = ElementEncodingType!A;
    private T* _data;
    private uint len, cap;
     
    @property size_t length() const {return len;}
    bool empty() const { return len == 0; }
     
    void reserve(size_t nlen) {
        import core.memory : GC;
        if (nlen <= cap) return;
        
        void* nx = GC.malloc(nlen * T.sizeof);

        cap = nlen.to!uint;
        if (len) memcpy(nx, _data, len * T.sizeof);
        _data = cast(T*)(nx);
    }
    void free() {
        import core.memory : GC;
        GC.free(_data);
    }
     
    void opOpAssign(string op : "~")(T item) {
        if (len == cap) {
            reserve(max(MIN, cap*2));
        }
        _data[len++] = item;
    }
     
    void insertBack(T item) {
        this ~= item;
    }
     
    void removeBack() {
        len--;
    }
     
    void clear() {
        len = 0;
    }
    ref inout(T) back() inout { assert(len); return _data[len-1]; }
    ref inout(T) opIndex(size_t i) inout { return _data[i]; }
     
    T[] data() {
        return (_data) ? _data[0..len] : null;
    }
}

 
 

/*
This source code generated by dcomp and include dcomp's source code.
dcomp's Copyright: Copyright (c) 2016- Kohei Morita. (https://github.com/yosupo06/dcomp)
dcomp's License: MIT License(https://github.com/yosupo06/dcomp/blob/master/LICENSE.txt)
*/


Measured memory_bytes: 13820