#include <bits/stdc++.h>
using namespace std;
unordered_map<int, bool> lo;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int b[27] = {0};
  int a[27] = {0};
  for (int i = 0; i < n; i++) {
    int y = s[i] - 'A';
    a[y] = i + 1;
    b[y]++;
  }
  int count = 0;
  for (int i = 0; i < n; i++) {
    int y = s[i] - 'A';
    if (b[y] > 1) {
      if (a[y] == i + 1) {
        count--;
        lo[y] = false;
      } else {
        if (lo[y] == false) {
          count++;
          lo[y] = true;
        }
      }
    } else {
      if (count == k) {
        cout << "YES";
        return 0;
      }
    }
    if (count > k) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
