#include <bits/stdc++.h>
using namespace std;
struct node {
  int l, r;
  node() { l = r = -1; }
} p[30];
int vis[30], sum[1000005];
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    int id = s[i] - 'A';
    if (!vis[id]) {
      p[id].l = p[id].r = i;
      vis[id] = 1;
    } else
      p[id].r = i;
  }
  for (int i = 0; i < 26; i++) {
    if (vis[i]) {
      sum[p[i].l]++;
      sum[p[i].r + 1]--;
    }
  }
  int ans = sum[0];
  if (ans > k) {
    cout << "YES";
    return 0;
  }
  for (int i = 1; i < n; i++) {
    sum[i] = sum[i - 1] + sum[i];
    if (sum[i] > k) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
