#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define f first
#define s second
#define pb push_back
#define pf push_front
#define in insert
#define elif else if
#define nl '\n'

typedef __int128 int128;
typedef long double ld;
#define  long  int64_t
#define ulong uint64_t
#define uint  uint32_t

using namespace std;
using namespace __gnu_pbds;
mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());

template <class T>
using oset = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>;

#define int long

const int N = 2e5 + 9;

bool b[N];
int t, n, m, a[N];

int32_t main() {
    cin.tie(0); ios::sync_with_stdio(0);
    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;
        b[i] = (c == 'R');
    }
    bool ok = 1;
    for (int i = 1; i < n; ++i)
        ok &= (a[0] % 2 == a[i] % 2);
    if (!ok) {
        cout << "No";
        return 0;
    }
    cout << "Yes";
}
