#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  string s;
  cin >> n >> k >> s;
  int last[26] = {};
  for (int i = n - 1; i >= 0; i--)
    if (last[s[i] - 'A'] == 0) last[s[i] - 'A'] = i + 1;
  bool guards[26] = {false};
  for (int i = 0; i < n; i++) {
    if (!guards[s[i] - 'A']) {
      k--;
      if (k < 0) break;
      guards[s[i] - 'A'] = true;
    }
    if (last[s[i] - 'A'] == i + 1) {
      k++;
      guards[s[i] - 'A'] = false;
    }
  }
  if (k >= 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
