#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int count[1001] = {0};
  for (int i = n - 1; i >= 0; i--) {
    if (count[a[i]])
      a[i] = 0;
    else
      count[a[i]]++;
  }
  int left = 0;
  for (int i = 0; i < n; i++)
    if (a[i]) left++;
  if (left >= k) {
    cout << "YES\n";
    for (int i = 0, j = 0; i < n, j < k; i++)
      if (a[i]) {
        cout << i + 1 << ' ';
        j++;
      }
    cout << '\n';
  } else
    cout << "NO\n";
  return 0;
}
