#include <bits/stdc++.h>
#define int long long
#define all(x) x.begin(), x.end()
#define pb push_back
#define rall(x) x.rbegin(), x.rend()
using namespace std;
using ll = long long;
using ld = long double;

int ans = -1;
vector<pair<int, int>> c;
map<pair<int, pair<vector<int>, string>>, bool> mp;
int n;

void gen(int &t, int &m, vector<int> &pos, string &way, vector<pair<int, int>> &ch) {
    mp[{m, {pos, way}}] = true;
    bool f = true;
    for (int i = 1; i < n; i++) {
        if (way[i] != way[0]) f = false;
        if (pos[i] != pos[0]) f = false;
    }
    if (f) {
        if (m > ans) {
            ans = m;
            c = ch;
        }
        return;
    }
    vector<int> np;
    string nw;
    for (int i = 0; i < n; i++) {
        if (pos[i] == m - 1 && way[i] == 'R') {
            nw += 'L';
        } else if (pos[i] == 2 && way[i] == 'L') {
            nw += 'R';
        } else {
            nw += way[i];
        }
        np.pb(pos[i]);
        if (way[i] == 'L') np.back()--;
        else np.back()++;
    }
    if (!mp[{m, {np, nw}}]) {
        t++;
        gen(t, m, np, nw, ch);
        t--;
    }
    int pm = m;
    for (int i = m; i >= 1; i--) {
        bool ff = true;
        for (auto &p : pos) if (p == m) ff = false;
        if (!ff)  break;
        m--;
        for (int j = 0; j < n; j++) {
            if (pos[j] == m) {
                way[j] = 'L';
            }
        }
        if (!mp[{m, {pos, way}}]) {
            ch.pb({t, m});
            t++;
            gen(t, m, pos, way, ch);
            t--;
            ch.pop_back();
        }
    }
    m = pm;
}

void solve() {
    int t;
    cin >> t;
    int m;
    cin >> n >> m;
    vector<int> pos(n);
    for (auto &el : pos) cin >> el;
    string way;
    cin >> way;
    if (m % 2 == 0) {
        cout << "No";
        return;
    }
    cout << "Yes\n";
    if (t > 1) {
        cout << m - m / 2 << "\n";
    }
    if (t == 3) {
        cout << 1 << "\n";
        cout << m / 2 << ' ' << m - m / 2;
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin >> t;
    while (t--) solve();
}