#include <bits/stdc++.h>
using namespace std;
int ent[30], la[30];
int main(void) {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  memset(ent, -1, sizeof ent);
  for (int i = 0; i < n; i++) {
    if (ent[s[i] - 'A'] == -1) ent[s[i] - 'A'] = i;
    la[s[i] - 'A'] = i;
  }
  set<int> st;
  bool ok = 1;
  for (int i = 0; i < n; i++) {
    if (i == ent[s[i] - 'A']) st.emplace(s[i]);
    if (st.size() > k) ok = 0;
    if (i == la[s[i] - 'A']) st.erase(s[i]);
  }
  if (!ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
