#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  map<char, int> mp;
  map<char, bool> bp;
  for (int i = 0; i < n; i++) {
    mp[s[i]]++;
    bp[s[i]] = false;
  }
  int cnt = 0, mnt = INT_MIN;
  for (int i = 0; i < n; i++) {
    mp[s[i]]--;
    if (bp[s[i]] == false) {
      cnt++;
      bp[s[i]] = true;
    }
    mnt = max(mnt, cnt);
    if (mp[s[i]] == 0) cnt--;
  }
  if (mnt <= k)
    cout << "NO"
         << "\n";
  else
    cout << "YES"
         << "\n";
}
