#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
using ll = long long;

using oset = tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>;

void Solve();

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll tt = 1;
    // cin >> tt;
    while (tt--) {
        Solve();
    }
    return 0;
}

# define ff first
# define ss second

const ll mod = 998244353;
ll mult(ll a, ll b) {
    return a * b % mod;
}

ll add(ll a, ll b) {
    return (a + b) % mod;
}

ll binpow(ll a, ll p) {
    ll ans = 1;
    while (p) {
        if (p & 1) ans = mult(ans, a);
        a = mult(a, a);
        p /= 2;
    }
    return ans;
}

void Solve() {
    ll t, n, m;
    cin >> t >> n >> m;
    vector<ll> a(n);
    for (auto &x : a) {
        cin >> x;
    }
    string s;
    cin >> s;
    vector<pair<ll, char>> z;
    for (ll i = 0; i < n; ++i) {
        z.push_back({a[i], s[i]});
    }
    sort(z.begin(), z.end());
    for (ll i = 1; i < n; ++i) {
        if (s[i] != s[i - 1] && abs(a[i] - a[i - 1]) == 1) {
            cout << "No\n";
            return;
        }
    }
    cout << "Yes\n";
}