#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  for (long long int i = 0; i < t; i++) {
    long long int n, k;
    cin >> n >> k;
    vector<long long int> nos(n + 1);
    vector<long long int> cum(n + 1);
    cin >> nos[1];
    cum[1] = nos[1];
    for (long long int i = 2; i <= n; i++) {
      cin >> nos[i];
      cum[i] = cum[i - 1] + nos[i];
    }
    int count = 0;
    long long int p = 1;
    for (long long int i = 1; i < n; i++) {
      if (count == k - 1) break;
      if (cum[i] % 2 == p) {
        count++;
        if (p == 1)
          p = 0;
        else
          p = 1;
      }
    }
    long long int f = 0;
    if (count == k - 1) {
      if (k % 2 == 0 && cum[n] % 2 == 1)
        f = 1;
      else if (k % 2 == 1 && cum[n] % 2 == 0)
        f = 1;
    } else if (count < k - 1)
      f = 1;
    if (f == 1)
      cout << "NO\n";
    else {
      long long int count = 0;
      cout << "YES\n";
      long long int p = 1;
      for (long long int i = 1; i < n; i++) {
        if (count == k - 1) break;
        if (cum[i] % 2 == p) {
          count++;
          cout << i << " ";
          if (p == 1)
            p = 0;
          else
            p = 1;
        }
      }
      cout << n << "\n";
    }
  }
}
