#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;

#define all(v) begin(v), end(v)
#define rall(v) rbegin(v), rend(v)
#define FOR(i, a, b) for(ll i = a; i < b; ++i)
#define ROF(i, a, b) for(ll i = b; i >= a; --i)

mt19937 rnd(42);
mt19937_64 rnd64(52);

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ll T, n, m;
    cin >> T >> n >> m;
    vector<ll> a(n);
    for (ll i = 0; i < n; ++i) {
        cin >> a[i];
    }
    vector<ll> b(n);
    for (int i = 0; i < n; ++i) {
        char c; cin >> c;
        if (c == 'R') b[i] = 1;
    }
    if (a[0] > a[1]) {
        swap(a[0], a[1]);
        swap(b[0], b[1]);
    }
    if ((a[1] - a[0]) % 2 != 0) {
        cout << "No";
    }
    else {
        cout << "Yes\n";
        if (a[0] == 1 && a[1] == m) {
            if (T >= 2) {
                cout << m / 2 + 1 << '\n';
            }
            if (T >= 3) {
                cout << "1\n";
                cout << m / 2 << " " << m / 2 + 1;
            }
            return 0;
        }
        if (b[0] == b[1] && b[0] == 1) {
            if (T >= 2) {
                cout << m - (a[1] - a[0]) / 2 << '\n';
            }
            if (T >= 3) {
                cout << "1\n";
                cout << m - a[1] + (a[1] - a[0]) / 2 << " " << m - (a[1] - a[0]) / 2;
            }
        }
    }
}