#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
const long long N = 2e5 + 5;
long long t, n, k, a[N], temp;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    temp = k;
    vector<long long> ans;
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
      a[i] %= 2;
      a[i] += a[i - 1];
      a[i] %= 2;
    }
    if (a[n] % 2 != k % 2) {
      cout << "NO"
           << "\n";
      continue;
    }
    long long x = 1;
    for (long long i = 1; i <= n && k > 1; i++)
      if (a[i] % 2 == x) {
        x = (a[i] % 2) ^ 1;
        ans.push_back(i);
        k--;
      }
    ans.push_back(n);
    k = temp;
    if (ans.size() < k) {
      cout << "NO"
           << "\n";
      continue;
    }
    cout << "YES"
         << "\n";
    for (auto &i : ans) cout << i << " ";
    cout << "\n";
  }
  return 0;
}
