#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> fst(26, -1);
  vector<int> lst(26, -1);
  string s;
  cin >> s;
  for (int i = 0; i < (int)s.size(); ++i) {
    int t = s[i] - 'A';
    if (fst[t] == -1) fst[t] = i;
    lst[t] = i;
  }
  int open = 0;
  bool ok = true;
  for (int i = 0; i < (int)s.size(); ++i) {
    int x = s[i] - 'A';
    if (fst[x] == i) open++;
    if (open > k) ok = false;
    if (lst[x] == i) open--;
  }
  if (!ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
