#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  string d;
  d = s;
  sort((d).begin(), (d).end());
  map<char, pair<long long, pair<long long, bool>>> a;
  for (long long i = 0; i < s.size(); i++) {
    if (((a).find(s[i]) != (a).end())) {
      a[s[i]].second.first = i;
    } else {
      a.insert(make_pair(s[i], make_pair(i, make_pair(i, false))));
    }
  }
  long long flag = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (!a[s[i]].second.second) {
      k--;
      a[s[i]].second.second = true;
    }
    if (k < 0) {
      flag++;
      break;
    }
    if (a[s[i]].second.first == i) k++;
  }
  if (flag == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
