#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<iomanip>
#include<queue>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<cmath>
#include<algorithm>
#include<random>
#include<ctime>

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,bmi,popcnt")

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned int;

mt19937 mt(time(0));
const int N = 2e5 + 2, mod = 998244353, inf = 1e9 + 100;
const ll llinf = 1e18 + 1000;
int n, m, a[N], b[N], ty;

void solve() {
	cin >> ty >> n >> m;
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	for (int i = 0; i + 1 < n; ++i) {
		if (a[i] % 2 != a[i + 1] % 2) {
			cout << "No";
			return;
		}
	}
	string s;
	cin >> s;
	for (int i = 0; i < n; ++i) {
		b[i] = (s[i] == 'R') ? 1 : 0;
	}
	cout << "Yes\n";
	if (ty == 1) return;
	cout << (m + 1) / 2;
	if (ty == 2) return;
	cout << "\n1\n" << m / 2 << ' ' << (m + 1) / 2;
}

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