#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  char str[1000005];
  cin >> str;
  long long slen = strlen(str);
  long long havep[30] = {0}, nowp[30] = {0};
  for (int i = 0; i < slen; i++) {
    ++havep[str[i] - 'A'];
  }
  long long usemen = 0, fl = 0;
  ;
  for (int i = 0; i < slen; i++) {
    if (nowp[str[i] - 'A'] == 0) {
      ++usemen;
      ++nowp[str[i] - 'A'];
    } else if (nowp[str[i] - 'A'] > 0) {
      ++nowp[str[i] - 'A'];
    }
    if (usemen > k) {
      fl = 1;
      break;
    }
    if (nowp[str[i] - 'A'] == havep[str[i] - 'A']) {
      --usemen;
      nowp[str[i] - 'A'] = 0;
    }
  }
  if (fl == 0)
    cout << "NO" << endl;
  else if (fl == 1)
    cout << "YES" << endl;
}
