#include <bits/stdc++.h>
using namespace std;
int N, a[3000];
int main() {
  int n, k;
  cin >> n >> k;
  set<int> s;
  vector<int> v;
  int p = 0, t;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    s.insert(t);
    if (s.size() == p + 1) {
      t = i;
      v.push_back(t + 1);
      p++;
    }
  }
  if (s.size() >= k) {
    cout << "YES" << endl;
    for (int i = 0; i < k; i++) {
      cout << v[i] << " ";
    }
  } else
    cout << "NO" << endl;
}
