#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #pragma GCC optimize("O3,Ofast,unroll-loops")
// #pragma GCC target("avx2,bmi")

using namespace std;
// using namespace __gnu_pbds;
// template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void solve();

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    int t = 1;
    while (t--) {
        solve();
    }
}

#define int long long
const int MAXN = 1e6 + 1, MOD = 998244353, INF = 2e18;



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