#include <bits/stdc++.h>

#define int long long
using ll = long long;
using ld = long double;
using namespace std;

const int INF = 1e18, MAXN = 1e5, mod = 998244353;

void solve();

int gg;

signed main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int tt = 1;
    cin >> gg;
    // cin >> tt;
    while (tt--) {
        solve();
        cout << "\n";
    }
}

int mx_m = -INF;
vector<pair<int,int> > ans;

struct node {
    int x;
    char c;
};


void solve() {
    int n, m;
    cin >> n >> m;
    m--;
    vector<node> arr(n);
    for (int i = 0; i < n; i++) {
        cin >> arr[i].x;
    }
    string s;
    cin >> s;
    for (int i = 0; i < n; i++) {
        arr[i].x = arr[i].c;
    }


    bool check = true;
    for (int i = 1; i < n; i++) {
        if (arr[i].x % 2 != arr[i - 1].x % 2) {
            check = false;
        }
    }
    if (!check) {
        cout << "No";
        return;
    }
    cout << "Yes\n";

    int cnt = 0;
    if (s[0] != s[1]) {
        int sm1, sm2;
        if (s[0] == 'L') {
            sm1 = arr[0].x;
        } else {
            sm1 = m - arr[0].x;
        }

        if (s[1] == 'L') {
            sm2 = arr[1].x;
        } else {
            sm2 = m - arr[1].x;
        }
        if (sm1 == sm2) {
            if (gg >= 2) {
                cout << m / 2 + 1 << "\n";
            }
            if (gg >= 3) {
                cout << 1 << '\n';
                cout << m / 2 << " " << m / 2 + 1 << '\n';
            }
            return;
        }

        int sm = min(sm1, sm2);
        cnt = sm;
        for (int i = 0; i < n; i++) {
            if (arr[i].c == 'L') {
                arr[i].x -= sm;
            } else {
                arr[i].x += sm;
            }
        }
        for (int i = 0; i < n; i++) {
            if (arr[i].x == 0 && arr[i].c == 'L') {
                arr[i].c = 'R';
            }
            if (arr[i].x == m && arr[i].c == 'R') {
                arr[i].c = 'L';
            }
        }
    }
    if (s[0] != s[1]) {
        assert(0);
    }

    if (s[0] == 'L') {
    } else if (s[0] == 'R') {
    }
}
