#include <bits/stdc++.h>
const int maxsz = 2e5 + 10;
int a[maxsz];
const int maxn = 5000000 * 20 + 10;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int num, n, m, k = 0;
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &num);
      if (num & 1) a[++k] = i;
    }
    if (k >= m && (k - m) % 2 == 0) {
      puts("YES");
      for (int i = 1; i < m; i++) printf("%d ", a[i]);
      printf("%d\n", n);
    } else
      puts("NO");
  }
  return 0;
}
