#include<bits/stdc++.h>
using namespace std;


void solve() {
    int t, n, m, flag = 1;
    cin >> t >> n >> m;
    string s;
    vector<int> a(n + 1);
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        if (a[i] % 2 != a[1] % 2) flag = 0;
    }
    cin >> s;
    if (!flag) {
        cout << "No";
        return;
    }
    cout << "Yes";
}

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

    solve();
}
