#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  string s;
  cin >> n >> k >> s;
  long long las[26];
  set<char> ss;
  for (long long i = 0; i < 26; i++) las[i] = -1;
  for (long long i = n - 1; i >= 0; i--)
    if (las[s[i] - 'A'] == -1) las[s[i] - 'A'] = i;
  for (long long i = 0; i < n; i++) {
    ss.insert(s[i]);
    if (ss.size() > k) return cout << "YES\n", 0;
    if (i == las[s[i] - 'A']) ss.erase(s[i]);
  }
  cout << "NO\n";
  return 0;
}
