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