#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[n];
  for (int i = 0; i < (long long)n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < (long long)n; i++) {
    int aux = arr[i];
    if (aux != -1) {
      for (int j = i + 1; j < n; j++) {
        if (arr[j] == aux) arr[j] = -1;
      }
    }
  }
  int can = 0;
  for (int i = 0; i < (long long)n; i++) {
    if (arr[i] != -1) {
      can++;
    }
  }
  if (can >= m) {
    cout << "YES" << endl;
    int coun = 0;
    int k = 0;
    while (coun < m) {
      if (arr[k] != -1) {
        cout << k + 1 << " ";
        coun++;
      }
      k++;
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
