#include <bits/stdc++.h>
#define int long long

using namespace std;

signed main() {
    int t, m;
    cin >> t;
    int n;
    cin >> n >> m;
    int a1, a2;
    cin >> a1 >> a2;
    if (a2 % 2 != a1 % 2) {
        cout << "No" << endl;
        return 0;
    }
    string s;
    cin >> s;
    int t1 = -1, x = -1;
    for (int i = 0; i < 10 * m; ++i) {
        if (a1 == 1) {
            s[0] = 'R';
        } else if (a1 == m) {
            s[0] = 'L';
        }
        if (a2 == 1) {
            s[1] = 'R';
        } else if (a2 == m) {
            s[1] = 'L';
        }
        if (a1 == a2) {
            if (a1 >= x) {
                x = a1;
                t1 = i;
            }
        }
        if (s[1] == 'R') a2++;
        else a2--;
        if (s[0] == 'R') a1++;
        else a1--;
    }
    cout << "Yes" << endl;
    if (t >= 2) {
        cout << x << endl;
    }
    if (t == 3) {
        cout << 1 << endl;
        cout << t1 << " " << x << endl;
    }
    return 0;
}
