#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int a[26];
  for (int i = 0; i < n; i++) {
    a[s[i] - 'A'] = i;
  }
  int active = 0;
  int visited[26] = {0};
  for (int i = 0; i < n; i++) {
    if (visited[s[i] - 'A'] == 0) {
      active++;
    }
    if (active > k) {
      cout << "YES" << endl;
      return 0;
    }
    visited[s[i] - 'A'] = 1;
    if (a[s[i] - 'A'] == i) {
      active--;
    }
  }
  cout << "NO" << endl;
}
