#include <bits/stdc++.h>
#define int long long

using namespace std;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    int n, m;
    cin >> n >> m;
    int x;
    cin >> x;
    int fl = 1;
    for (int i = 0; i < n - 1; ++i) {
        int y;
        cin >> y;
        if (y != x) {
            fl = 0;
            break;
        }
    }
    if (fl == 1) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
        return 0;
    }
    if (t == 1) {
        return 0;
    }
    cout << m << '\n';
    if (t == 2) {
        return 0;
    }
    cout << 0;
}
