#include <bits/stdc++.h>

using namespace std;

#define int long long

const int MOD = 998244353;
const int MAXN = 1e5;
const int INF = 1e18;

struct dot {
    int x, y;
    dot(int _x = 0, int _y = 0) : x(_x), y(_y) {}
    bool operator<(dot &o) {
        return (x - o.x ? x < o.x : y < o.y);
    }
};

int32_t main() {
    int t;
    int n, m; cin >> t >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    string s; cin >> s;
    if (!(m - 2)) {
        sort(a.begin(), a.end()); a.erase(unique(a.begin(), a.end()));
        if (a.size() - 1) cout << "No\n";
        else {
            cout << "Yes\n";
            if (t - 1) cout << 0;
        }
    } else if (!(m - 3)) {
        sort(a.begin(), a.end());
        a.erase(unique(a.begin(), a.end()), a.end());
        if (!(a.size() - 1)) { cout << "Yes\n"; if (t - 1) cout << 0 << '\n'; }
        else if (!(a.size() - 2)) {
            if (a[1] - a[0] - 1) { cout << "Yes\n"; if (t - 1) cout << 1; }
            else cout << "No\n";
        } else cout << "No\n";
    } else if (!(m - 4)) {
        sort(a.begin(), a.end()); a.erase(unique(a.begin(), a.end()), a.end());
        if (!(a.size() - 1)) { cout << "Yes\n"; if (t - 1) cout << 0; }
        else if (!(a.size() - 2))) {
        if (!(a[1] - a[0] - 2)) { cout << "Yes\n"; if (t - 1) cout << 1; }
        else cout << "No\n";} else {
            cout << "No\n";
        }
    } else { cout << "Yes\n"; if (t - 1) cout << 0; }
    if (!(t - 1)) cout << "Yes\n";
    else if (!(t - 2)) {
        cout << 0 << '\n';
    } else {
    cout << 0 << '\n';

    }
    return 0;
}