#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx,avx2,bmi2,fma")
// mt19937 rnd(24523);


signed main() {
#ifdef LOCAL
    freopen("C:\\Users\\olymp\\Desktop\\VS\\input.txt", "r", stdin);
    freopen("C:\\Users\\olymp\\Desktop\\VS\\output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(0);
    cin.tie(0);

    int T, n, m, cnt0 = 0, cnt1 = 0;
    cin >> T >> n >> m;
    vector<int> arr(n);
    for (auto& it : arr) {
        cin >> it;
        if (it % 2 == 0) {
            cnt0++;
        } else {
            cnt1++;
        }
    }
    string s;
    cin >> s;

    if (cnt0 && cnt1) {
        cout << "No" << endl;
        exit(0);
    } else {
        cout << "Yes" << endl;
    }

    vector<array<int, 2>> ans;
    for (int i = 1; i < m; ++i) {
        ans.push_back({i, m - i});
    }
    if (T >= 2) {
        cout << 1 << endl;
    }
    if (T == 3) {
        cout << ans.size() << endl;
        for (auto& [a, b] : ans) {
            cout << a << ' ' << b << endl;
        }
    }
}

/*
3
2 3
1 3
RL


*/