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

using namespace std;




int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	ll t; cin >> t;
	while (t--)
	{
		ll n, m, k; cin >> n >> k >> m;

		vector<ll>arr(m);

		for (ll i = 0; i < m; i++)
			cin >> arr[i];

		ll len = k / 2LL;

		if ((n - m) % (k - 1))
			cout << "NO\n";
		else if (n == m)
			cout << "YES\n";
		else
		{
			vector<ll>diff;

			ll prev = 0;
			for (ll i = 0; i < m; i++)
			{
				diff.push_back(arr[i] - prev - 1LL);
				prev = arr[i];
			}

			vector<ll>pref(m);
			pref[0] = diff[0];

			for (ll i = 1; i < m; i++)
				pref[i] = pref[i - 1] + diff[i];

			bool check = false;
			for (ll i = 0; i < m; i++)
			{
				ll l = pref[i] , r = n - m - l;

				if (l >= len && r >= len)
					check = true;
			}
			if (check)
				cout << "YES\n";
			else
				cout << "NO\n";
		}

	}
	return 0;
}