#include <bits/stdc++.h>
#define int long long
#define all(x) x.begin(), x.end()
#define pb push_back
#define rall(x) x.rbegin(), x.rend()
using namespace std;
using ll = long long;
using ld = long double;

void solve() {
    int t, n, m;
    cin >> t >> n >> m;
    vector<int> y(n);
    for (auto &el : y) cin >> el;
    string way;
    cin >> way;
    vector<int> pos;
    for (int i = 0; i < n; i++) {
        if (way[i] == 'R') pos.pb(y[i]);
        else pos.pb(m + (m - y[i]));
    }
    for (int i = 1; i < n; i++) {
        if (pos[i] % 2 != pos[0] % 2) {
            cout << "No";
            return;
        }
    }
    cout << "Yes";
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin >> t;
    while (t--) solve();
}