#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
char s[N];
int n, k, last[200], first[200], a[N];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) a[i] = s[i] - 'A', last[a[i]] = i;
  for (int i = n; i >= 1; i--) first[a[i]] = i;
  int num = 0;
  for (int i = 1; i <= n; i++) {
    if (first[a[i]] == i) num++;
    if (num > k) {
      puts("YES");
      return 0;
    }
    if (last[a[i]] == i) num--;
  }
  puts("NO");
  return 0;
}
