#include <bits/stdc++.h>
char s;
int n, k, start[26] = {0}, end[26], cnt[1000001] = {0};
int main() {
  scanf("%d %d\n", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%c", &s);
    if (start[s - 'A'] == 0) start[s - 'A'] = i;
    end[s - 'A'] = i;
  }
  for (int i = 0; i < 26; i++) {
    if (start[i] > 0) cnt[start[i] - 1]++;
    if (end[i] > 0) cnt[end[i]]--;
  }
  for (int i = 0; i <= n; i++) {
    if (i > 0) cnt[i] += cnt[i - 1];
    if (cnt[i] > k) {
      printf("YES\n");
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
