#include <bits/stdc++.h>
using namespace std;
int cr[300], go[300];
char s[1000009];
int main() {
  int i, j, a, b, ts, cn = 0, n, ln, k;
  scanf("%d %d ", &n, &k);
  scanf("%s", s);
  memset(cr, 0, sizeof(cr));
  memset(go, 0, sizeof(go));
  for (i = 0; i < n; i++) {
    cr[s[i]]++;
  }
  int ng = 0, f = 1;
  for (i = 0; i < n; i++) {
    if (!go[s[i]]) {
      ng++;
      go[s[i]] = 1;
    }
    cr[s[i]]--;
    if (ng > k) f = 0;
    if (cr[s[i]] == 0) ng--;
  }
  if (f == 0)
    puts("YES");
  else
    puts("NO");
  return 0;
}
