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

using namespace std;
using namespace __gnu_pbds;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define Vector2 pair <int, int>
#define print(a) for (const auto& x : a) cout << x << ' ';

void solve()
{
	int T;
	cin >> T;
	int n, m;
	cin >> n >> m;
	vector <int> a(n);
	bool flag1 = true, flag2 = true;
	for (auto& x : a) {
		cin >> x;
		if (x % 2) {
			flag1 = false;
		}
		if (!(x % 2)) {
			flag2 = false;
		}
	}
	string s;
	cin >> s;
	if (!flag1 && !flag2) {
		cout << "No\n";
		return;
	}
	cout << "Yes\n";
}

signed main()
{
	cin.tie(nullptr)->ios_base::sync_with_stdio(false);
	solve();
	return 0;
}