#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, K;
  cin >> N >> K;
  string S;
  cin >> S;
  vector<long long> start(26, 0), end(26, 0);
  long long i, j, k;
  bool buzz = true;
  for (i = 0; i < N; i++) {
    if (start[S[i] - 65] == 0) start[S[i] - 65] = (i + 1);
    end[S[i] - 65] = (i + 2);
  }
  k = 0;
  for (i = 1; i <= N + 1; i++) {
    for (j = 0; j < 26; j++) {
      if (start[j] == i) k++;
      if (end[j] == i) k--;
    }
    if (k > K) {
      buzz = false;
      break;
    }
  }
  if (buzz)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
