#include <experimental/random>
#include <bits/stdc++.h>

using namespace std;
//experimental::randint(1, 10);
#define ll long long

ll MOD = 998244353;
ll INF = 1e18;


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    ll tt;
    cin >> tt;
    ll n, m;
    cin >> n >> m;
    vector<ll> s(n);
    map<ll,ll> mp;
    for (ll i = 0; i < n; i++) {
        cin >> s[i];
        mp[s[i] % 2]++;
    }
    string z;
    cin >> z;
    if (tt == 1) {
        if (mp.size() == 2) {
            cout<<"No";
        }else {
            cout<<"Yes";
        }
        return 0;
    }
}
