#include <bits/stdc++.h>
using namespace std;
char ch[1000100];
int chc[1000100];
int door[27], sum;
int main(void) {
  int n, k, i;
  while (scanf("%d%d%s", &n, &k, ch) != EOF) {
    memset(chc, 0, sizeof(chc));
    memset(door, 0, sizeof(door));
    int l = strlen(ch);
    for (i = 0; i < l; i++) {
      if (door[ch[i] - 'A'] == 0) {
        door[ch[i] - 'A'] = 1;
        chc[i] = 1;
      }
    }
    memset(door, 0, sizeof(door));
    for (i = l - 1; i >= 0; i--) {
      if (door[ch[i] - 'A'] == 0) {
        door[ch[i] - 'A'] = 1;
        if (chc[i] == 1)
          chc[i] = 3;
        else
          chc[i] = 2;
      }
    }
    sum = 0;
    int flag = 1;
    for (i = 0; i < l; i++) {
      if (chc[i] == 1 || chc[i] == 3) sum++;
      if (sum > k) {
        flag = 0;
        break;
      }
      if (chc[i] == 2 || chc[i] == 3) sum--;
    }
    if (flag)
      printf("NO\n");
    else
      printf("YES\n");
  }
  return 0;
}
