#include <bits/stdc++.h>

#ifndef LOCAL
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#endif

using namespace std;
using ll = int64_t;
const ll inf = 1e18;
void solve();

template<typename T, typename T1> T remax(T& x, T1 y) { if (x < y) x = y; return x; }
template<typename T, typename T1> T remin(T& x, T1 y) { if (y < x) x = y; return x; }

int main() {
#ifdef BLOCKS
    freopen("input.txt", "r", stdin);
#endif // BLOCKS
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
//    cin >> t;
    while (t--) solve();
}
#define int int64_t

void solve() {
    int t; cin >> t;
    int n, m; cin >> n >> m;
    vector<int> a(n);
    for (auto& x : a) cin >> x;
    string s; cin >> s;
    bool ok = 1;
    for (int i = 1; i < n; ++i) ok &= ~(a[i] - a[0]) & 1;
//    cout << (ok ? "Yes\n" : "No\n");
    if (!ok) {
        cout << "No\n";
        return;
    }
    cout << "Yes\n";
    if (t == 1) return;
    cout << m << '\n';
    if (t == 2) return;
    cout << "0\n";
}
