#include <bits/stdc++.h>
using namespace std;
const long long INF = (1LL << 60) - 1;
void solve() {
  set<int> st;
  int n, k, arr[1001];
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    st.insert(arr[i]);
  }
  if ((int)st.size() >= k) {
    puts("YES");
    int lst = -1;
    for (int i = 0; i < n && k; i++) {
      if (arr[i] != lst && st.find(arr[i]) != st.end()) {
        cout << i + 1 << " ";
        lst = arr[i];
        st.erase(arr[i]);
        k--;
      }
    }
  } else
    puts("NO");
}
int main() { solve(); }
