#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 24;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
char str[MAXN];
int st[26], ed[26];
int main() {
  int n, k;
  while (~scanf("%d%d", &n, &k)) {
    scanf("%s", str);
    for (int i = 0; i < 26; i++) {
      st[i] = ed[i] = -1;
    }
    for (int i = 0; i < n; i++) {
      if (st[str[i] - 'A'] == -1) {
        st[str[i] - 'A'] = i;
        ed[str[i] - 'A'] = i;
      } else {
        ed[str[i] - 'A'] = max(ed[str[i] - 'A'], i);
      }
    }
    bool flag = true;
    for (int i = 0; i < n && flag; i++) {
      if (st[str[i] - 'A'] == i) {
        k--;
        if (k < 0) {
          flag = false;
        }
      }
      if (ed[str[i] - 'A'] == i) {
        k++;
      }
    }
    printf(flag ? "NO\n" : "YES\n");
  }
  return 0;
}
