#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9, mxn = 1000010;
int A[mxn], first[30], last[30];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (int i = (0); i < (26); ++i) first[i] = last[i] = -1;
  for (int i = (0); i < (n); ++i) {
    first[s[n - i - 1] - 'A'] = n - i - 1;
    last[s[i] - 'A'] = i;
  }
  for (int i = (0); i < (26); ++i) {
    if (first[i] == -1) continue;
    A[first[i]]++;
    A[last[i] + 1]--;
  }
  for (int i = (1); i < (n); ++i) A[i] += A[i - 1];
  int max_val = 0;
  for (int i = (0); i < (n); ++i) max_val = max(max_val, A[i]);
  cout << (max_val > k ? "YES" : "NO") << '\n';
  return 0;
}
