#include <bits/stdc++.h>
using namespace std;
long long a[200011];
vector<long long> v;
int main() {
  ios::sync_with_stdio(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, k, i, sum = 0, res = 0;
    cin >> n >> k;
    for (i = 0; i < n; i++) cin >> a[i];
    for (i = 0; i < n; i++) {
      sum += a[i];
      if (sum % 2 == 1) {
        sum = 0;
        if (res < k) {
          res++;
          v.push_back(i + 1);
        } else {
          res--;
          v.erase(v.end() - 1);
        }
      }
    }
    if (res != k) {
      cout << "NO" << endl;
      v.clear();
      continue;
    }
    v[v.size() - 1] = n;
    cout << "YES" << endl;
    for (i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
    v.clear();
  }
  return 0;
}
