#include <bits/stdc++.h>
using namespace std;
int n, k;
string ss;
int s[28], f[28];
int tt[1000007];
int sum[1000007];
int flag;
int main() {
  cin >> n >> k;
  cin >> ss;
  for (int i = 0; i < n; i++) {
    int key = ss[i] - 'A' + 1;
    if (!s[key]) s[key] = i + 1;
    f[key] = i + 1;
  }
  for (int i = 0; i <= 26; i++) {
    if (s[i]) {
      tt[s[i]]++;
      tt[f[i] + 1]--;
    }
  }
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + tt[i];
    if (sum[i] > k) flag = 1;
  }
  if (flag == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
