#include <bits/stdc++.h>
using namespace std;
map<int, int> dic;
vector<int> ans;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    dic[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (dic[a[i]] == i) ans.push_back(i);
  }
  if (ans.size() < k)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < ans.size() && i < k; i++) cout << ans[i] << " ";
  }
  return 0;
}
