#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    mp[x] = i;
  }
  if (mp.size() < m) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  auto it = mp.begin();
  for (int i = 0; i < m; ++i) {
    cout << it->second + 1 << " ";
    it++;
  }
  return 0;
}
