#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e18, MOD = 1e9 + 7;
mt19937 rnd(time(0));

void solve();

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int T;
    cin >> T;
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    int s = 0;
    for (int i = 0; i < n; i++){
        int x;
        cin >> x;
        if (x % 2 == 1){s++;}
    }
    string t;
    cin >> t;
    if (s == 0 || s == n){cout << "Yes";}
    else{cout << "No";}
}

