#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t;
    cin >> t;
    int n,m;
    cin >> n >> m;
    int a[n];
    bool c = 0,nc = 0;
    for(int i = 0;i < n;++i)
    {
        cin >> a[i];
        c |= (a[i]%2 == 0);
        nc |= (a[i]%2 == 1);
    }
    string s;
    cin >> s;
    cout << ((!(c & nc)) ? "Yes\n" : "No\n");
    return 0;
}