#include <bits/stdc++.h>
int n, k, beg[30], end[30];
char s[1100000];
int main() {
  scanf("%d%d%s", &n, &k, s);
  memset(beg, -1, sizeof beg);
  memset(end, -1, sizeof end);
  for (int i = 0; i < n; i++)
    if (beg[s[i] - 'A'] == -1) beg[s[i] - 'A'] = i;
  for (int i = n - 1; i >= 0; i--)
    if (end[s[i] - 'A'] == -1) end[s[i] - 'A'] = i;
  int cnt = 0, f = 1;
  for (int i = 0; i < n; i++) {
    if (beg[s[i] - 'A'] == i) cnt++;
    if (cnt > k) {
      f = 0;
      break;
    }
    if (end[s[i] - 'A'] == i) cnt--;
  }
  puts(!f ? "YES" : "NO");
  return 0;
}
