#include <bits/stdc++.h>
#include  <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define all(x) x.begin(), x.end()

using ll = long long;
#define  int ll
const int maxn = 8000000 + 10;
int h[maxn];
int maxint[maxn];
int m;
int passed_t;
pair<int, int> pass_t(int x, int dir, int t) {
    t %= 2 * m;
    if (t == 0) {
        return {x, dir};
    }
    if (dir == -1) {
        if (t < x) {
            return {x - t, dir};
        }
        int nx = 0;
        dir = -dir;

        return pass_t(nx, dir, t - x);

    }
    if (t < m - x - 1) {

    return {x + t, dir};
    }
    int nx = m - 1;
    dir = -dir;
    return pass_t(nx, dir, t - (m - 1 - x));

}
vector<int> x;
vector<int> dir;
void move(int t) {
    passed_t += t;
    for (int i = 0; i < x.size(); ++i) {
    auto f = pass_t(x[i], dir[i], t);
    x[i] = f.first;
    dir[i] = f.second;

    }
}
void norm() {
    if (dir[0] == -1) {
        move(x[0]);
    }
    else if (dir[1] == -1) {
        swap(x[0], x[1]);
        swap(dir[0], dir[1]);
        move(x[0]);

    }
    else if (x[0] > x[1]) {
        swap(dir[0], dir[1]);

        swap(x[0], x[1]);
    }

    if (dir[1] == 1) {
        // cout << "JERe" << endl;
        // cout << x[0] << " ! " << x[1] << endl;
        move(m - x[1] - 1);
        // cout << x[0] << " ! " << x[1] << endl;

    }
    if ((x[0] + x[1])/2 < (m )/2) {
        // cout << x[0] << " " << x[1] << endl;

        move((x[1] - x[0])/2);
        // move(1);
        norm();
    }
}

signed main() {
#ifdef LOCAL
    freopen("main.in", "r", stdin);
    freopen("main.out", "w", stdout);
#endif
    int t, n;
    cin >> t >> n >> m;

    x.resize(n);
    dir.resize(n);
    for (int i = 0; i < n; ++i) {
        cin >> x[i];
        x[i]--;
    }
    for (int i = 0; i < n; ++i) {
        char c;
        cin >> c;
        if (c == 'L') {
            dir[i] = -1;
        }
        else {
            dir[i] = 1;
        }

    }
    bool chet = 0, nech = 0;
    bool akkeq = 1;
    for (int i = 0; i < n; ++i) {
        if (x[i] != x[0] || dir[i] != dir[0]) {
            akkeq= 0;
        }
        if (x[i] % 2 == 0) {
            chet = 1;
        }
        else {

            nech = 1;
        }
    }
    if (chet  && nech) {
        cout << "No\n";
        return 0;
    }
    cout << "Yes\n";

    if (akkeq) {
        if (t >= 2) {

        cout << m << "\n";
        }
        if (t >= 3) {

        cout << 0 << "\n";
        }
        return 0;
    }


    // cout << x[0] << " " << x[1] << endl;
    norm();
    move((x[1] - x[0])/2);
    if (t>=2) {

        cout << x[0] + 1 << "\n";
    }
    if (t >= 3) {
        cout << 1 << "\n";
        cout << passed_t << " " << x[0] + 1;

    }


}

