// #pragma GCC optimize("Ofast")

#include <iostream>
#include <bits/stdc++.h>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define all(x) x.begin(), x.end()

#ifdef DEBUG
    #define debug(x) {cout << __func__ << ":" << __LINE__ << " " << #x << " = " << x << "\n";};
    #define debugw(x) {cout << __func__ << ":" << __LINE__ << " " << x << "\n";};
#else
    #define debug(x)
    #define debugw(x)
#endif

const int N = 2e5 + 1;

int T, n, m;

int a[N];
int dir[N];

void solve() {
    cin >> T >> n >> m;

    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    for (int i = 0; i < n; i++) {
        char c;
        cin >> c;
        dir[i] = (c == 'R');
    }

    bool fl = true;

    for (int i = 1; i < n; i++) {
        if ((a[i] - a[i - 1]) % 2 == 1) {
            fl = false;
            break;
        }
    }

    if (!fl) {
        cout << "No\n";
        return;
    } 

    cout << "Yes\n";

    if (T == 1) return;
}

signed main() {
    // freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);

    // ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    // cout << set_precision(8) << fixed;

    // ll T;
    // cin >> T;
    // while (T--) solve();

    solve();
}