#include <bits/stdc++.h>

using namespace std;

const int N = 2e5 + 5;

int a[N];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);

    int T; cin >> T;

    int n, m;
    cin >> n >> m;

    for (int i = 1; i <= n; ++i) {
        cin >> a[i];
    }

    string s; cin >> s;

    sort(a + 1, a + n + 1);

    for (int i = 2; i <= n; ++i) {
        if ((a[i] - a[i - 1]) & 1) {
            cout << "No\n";
            return 0;
        }
    }
    
    cout << "Yes\n";
    
    if (n == 2 && a[1] == 1 && a[2] == m) {
        if (T == 2) {

        }

        if (T == 3) {

        }
    }


    return 0;
}
