#include <iostream>
#include <fstream>
#include <iomanip>
#include <random>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <bitset>
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
//#define int long long

using namespace std;
using ll = long long;
using ld = long double;

void sol() {
    int T, n, m;
    cin >> T >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        if (a[i] % 2 != a[0] % 2) {
            cout << "No\n";
            return;
        }
    }
    cout << "Yes\n";
    return;
}

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    sol();
    return 0;
}
