#include <bits/stdc++.h>
using namespace std;
map<int, bool> opened;
map<char, int> last;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (char i = 'A'; i <= 'Z'; i++) last[i] = -1;
  int openedcnt = 0;
  for (int i = s.length() - 1; i >= 0; i--) {
    if (last[s[i]] == -1) last[s[i]] = i;
  }
  for (int i = 0; i < s.length(); i++) {
    if (!opened[s[i]]) openedcnt++;
    opened[s[i]] = true;
    if (openedcnt > k) {
      cout << "YES";
      exit(0);
    }
    if (i == last[s[i]]) openedcnt--;
  }
  cout << "NO";
}
