#ifdef ONPC
    #define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>

using namespace std;

#define all(v) begin(v), end(v)

using ll = long long;

const ll INF = 1e18L + 10;

void test_case() {
    int t, n, m;
    cin >> t >> n >> m;
    vector<int> a(n);
    for (auto &i : a) {
        cin >> i; i--;
    }
    string s;
    cin >> s;

    vector<int> cnt(m);
    for (auto i : a) {
        cnt[i]++;
    }

    bool ok = true;
    for (auto i : a) {
        if (i > 0) ok &= cnt[i - 1] == 0;
    }

    cout << (ok ? "Yes" : "No") << '\n';
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
//    cin >> t;
    while (t--) {
        test_case();
    }

    return 0;
}
