#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  set<int, greater<int> > s;
  int input;
  int size = 0;
  set<int, greater<int> > output;
  for (int i = 0; i < n; i++) {
    cin >> input;
    s.insert(input);
    if (s.size() > size) {
      output.insert(i + 1);
      size = s.size();
    }
    if (output.size() >= k) {
      break;
    }
  }
  set<int, greater<int> >::iterator itr;
  if (output.size() >= k) {
    cout << "YES" << endl;
    for (itr = output.begin(); itr != output.end(); itr++) {
      cout << *itr << " ";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
