#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, open;
  scanf("%d%d\n", &n, &k);
  int last[30] = {0}, check[30] = {0};
  char s[n + 1];
  scanf("%s", s);
  for (i = 0; i < n; i++) {
    last[(int)(s[i] - 'A')] = i;
  }
  open = 0;
  for (i = 0; i < n; i++) {
    if (check[(int)(s[i] - 'A')] == 0) {
      check[(int)(s[i] - 'A')] = 1;
      open++;
    }
    if (open > k) {
      break;
    }
    if (i == last[(int)(s[i] - 'A')]) open--;
  }
  if (i == n)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
