#include <bits/stdc++.h>
using namespace std;
long long st[26], ed[26];
int32_t main() {
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  memset(st, -1, sizeof st);
  memset(ed, 0, sizeof ed);
  for (long long i = 0; i < s.size(); i++) {
    if (st[s[i] - 'A'] == -1) {
      st[s[i] - 'A'] = i + 1;
    }
    ed[s[i] - 'A'] = i + 1;
  }
  vector<pair<long long, long long> > line;
  for (char i = 'A'; i <= 'Z'; i++) {
    if (st[i - 'A'] != -1) {
      line.push_back(make_pair(st[i - 'A'], ed[i - 'A']));
    }
  }
  sort(line.begin(), line.end());
  priority_queue<long long, vector<long long>, greater<long long> > pq;
  for (long long i = 0; i < line.size(); i++) {
    if (pq.size()) {
      if (pq.top() < line[i].first) {
        pq.pop();
      }
      if (pq.size() == k) {
        cout << "YES" << endl;
        return 0;
      }
    }
    pq.push(line[i].second);
  }
  cout << "NO" << endl;
}
