#include <bits/stdc++.h>
using namespace std;
int num[100] = {0};
bool used[100];
int main(void) {
  int n, k;
  string s;
  cin >> n >> k;
  cin >> s;
  for (int i = 0; i < n; i++) {
    num[s[i] - 'A']++;
  }
  int cnt = 0;
  bool flag = 0;
  for (int i = 0; i < n; i++) {
    int door = s[i] - 'A';
    if (used[door] == 0) {
      used[door] = 1;
      cnt++;
    }
    if (cnt > k) {
      flag = 1;
      break;
    }
    num[door]--;
    if (num[door] <= 0) {
      used[door] = 0;
      cnt--;
    }
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
