#include <bits/stdc++.h>
using namespace std;
int int_pow(int x, int p) {
  if (p == 0) return 1;
  if (p == 1) return x;
  int tmp = int_pow(x, p / 2);
  if (p % 2 == 0)
    return tmp * tmp;
  else
    return x * tmp * tmp;
}
void fill(istream& in, vector<int>& a, int n) {
  int elm;
  for (int i = 0; i < n; ++i) {
    in >> elm;
    a.push_back(elm);
  }
}
void fill(istream& in, vector<long long>& a, int n) {
  long long elm;
  for (int i = 0; i < n; ++i) {
    in >> elm;
    a.push_back(elm);
  }
}
void fill(vector<int>& a, int n, int val) {
  for (int i = 0; i < n; ++i) {
    a.push_back(val);
  }
}
void fill(vector<long long>& a, int n, long long val) {
  for (int i = 0; i < n; ++i) {
    a.push_back(val);
  }
}
int sum(vector<int> arr) {
  int s = 0;
  for (auto& x : arr) s += x;
  return s;
}
int max(vector<int> a) { return *max_element(a.begin(), a.end()); }
int min(vector<int> a) { return *min_element(a.begin(), a.end()); }
void print(ostream& out, vector<int> a) {
  for (auto& x : a) {
    out << x << " ";
  }
  out << endl;
}
void print(ostream& out, vector<long long> a) {
  for (auto& x : a) {
    out << x << " ";
  }
  out << endl;
}
void print(ostream& out, vector<vector<int> > a) {
  for (auto& x : a) {
    print(out, x);
  }
}
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
unsigned long long power(unsigned long long a, unsigned long long b,
                         unsigned long long ret = 1LL) {
  while (b--) ret = (ret * a);
  return ret;
}
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
static auto speedup = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  return 0;
}();
class ADiverseTeam {
 public:
  static void solve(std::istream& in, std::ostream& out) {
    int x, n, k;
    in >> n >> k;
    vector<int> a;
    set<int> s;
    bool found = true;
    for (int i = 0; i < n; ++i) {
      in >> x;
      if (!(s.find(x) != s.end())) {
        s.insert(x);
        a.push_back(i);
        if (s.size() == k) {
          out << "YES" << endl;
          for (int i = 0; i < k; i++) {
            out << a[i] + 1 << " ";
          }
          found = false;
          break;
        }
      }
    }
    if (found) out << "NO" << endl;
  }
};
int main() {
  ADiverseTeam solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
