#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<long long> cum(n);
    cin >> cum[0];
    for (int i = 1; i < n; i++) {
      int x;
      cin >> x;
      cum[i] = cum[i - 1] + x;
    }
    bool ev, od;
    od = 1;
    ev = 0;
    int cnt = 0;
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      if (od && cum[i] % 2 != 0) {
        od = 0;
        ev = 1;
        cnt++;
        ans.push_back(i + 1);
      } else if (ev && cum[i] % 2 == 0) {
        od = 1;
        ev = 0;
        cnt++;
        ans.push_back(i + 1);
      }
    }
    if (cnt >= k && (ans.size() % 2 == k % 2)) {
      cout << "YES" << endl;
      for (int i = 0; i < k - 1; i++) cout << ans[i] << " ";
      cout << n << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
