#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void solve() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> a(n);
  long long int cnt = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    cnt += (a[i] % 2);
  }
  if (k > cnt) {
    cout << "NO\n";
    return;
  } else {
    vector<long long int> rInd;
    for (long long int i = 0; i < n; i++) {
      if (a[i] % 2) rInd.push_back(i);
    }
    if (rInd.back() != n - 1) {
      rInd.pop_back();
      rInd.push_back(n - 1);
    }
    if (rInd.size() == k) {
      cout << "YES\n";
      for (auto i : rInd) cout << i + 1 << " ";
      cout << endl;
    } else {
      while (rInd.size() >= 3 && rInd.size() > k) {
        long long int last = rInd.back();
        rInd.pop_back();
        rInd.pop_back();
        rInd.pop_back();
        rInd.push_back(last);
      }
      if (rInd.size() == k) {
        cout << "YES\n";
        for (auto i : rInd) cout << i + 1 << " ";
        cout << endl;
      } else {
        cout << "NO\n";
      }
    }
  }
}
signed main() {
  long long int q;
  cin >> q;
  for (long long int i = 0; i < q; i++) {
    solve();
  }
  return 0;
}
