#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <x86intrin.h>



#ifndef DEBUG
// #pragma GCC optimize("avx2")
// #pragma GCC optimize("O3")
#endif

using namespace __gnu_pbds;
using namespace std::ranges;

using ll = long long;
using ld = long double;
template<typename T>
using oset = tree<T, null_type, std::less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using pll = std::pair<ll, ll>;

const ll MOD = 998244353;
const ll MOD1 = 1000000007;

std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());

void solve() {
    ll T;
    std::cin >> T;
    ll n, m;
    std::cin >> n >> m;
    std::vector<ll> a(m);
    for (int i = 0; i < m; ++i) {
        std::cin >> a[i];
    }
    std::string s;
    std::cin >> s;
    std::cout << "Yes\n";
    if (T >= 2) {
        std::cout << m << '\n';
    }
    if (T == 3) {
        std::cout << 0;
    }
}

int main() {
#ifdef DEBUG
    std::freopen("input.txt", "r", stdin);
#endif
    std::cin.tie(0)->std::ios::sync_with_stdio(0);
    int tt = 1;
    // std::cin >> tt;
    while (tt--) {
        solve();
    }
}
