#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int first[26], last[26];
  for (int i = 0; i < 26; i++) first[i] = 100, last[i] = -1;
  int n, k, open = 0;
  string s;
  cin >> n >> k >> s;
  for (int i = 0; i < (int)s.size(); i++) {
    int c = s[i] - 'A';
    first[c] = min(first[c], i);
    last[c] = max(last[c], i);
  }
  for (int i = 0; i < (int)s.size(); i++) {
    int c = s[i] - 'A';
    if (i == first[c]) open++;
    if (open > k) {
      cout << "YES";
      return 0;
    }
    if (i == last[c]) open--;
  }
  cout << "NO";
}
