#include <bits/stdc++.h>
using namespace std;
int arr[1000];
int arrr[1000];
int main() {
  memset(arr, 0, sizeof(arr));
  memset(arrr, 0, sizeof(arrr));
  int n, m;
  cin >> n >> m;
  string str;
  cin >> str;
  bool f = true;
  int c = 0;
  for (int i = 0; i != str.size(); i++) {
    arr[str[i]]++;
  }
  for (int i = str.size() - 1; i != -1; i--) {
    arr[str[i]]--;
    if (!arrr[str[i]]) {
      arrr[str[i]]++;
      c++;
    }
    if (c > m) {
      f = false;
      break;
    }
    if (!arr[str[i]]) c--;
  }
  if (f)
    puts("NO");
  else
    puts("YES");
  return 0;
}
