#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int last[26];
  unordered_set<char> total;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    last[s[i] - 'A'] = i;
  }
  int depth = 0;
  for (int i = 0; i < n; i++) {
    total.insert(s[i]);
    depth = max(depth, (int)total.size());
    if (last[s[i] - 'A'] == i) {
      total.erase(s[i]);
    }
  }
  if (depth <= k) {
    cout << "NO" << endl;
  } else if (depth > k) {
    cout << "YES" << endl;
  }
  return 0;
}
