#include <bits/stdc++.h>
using namespace std;
int n, k, cnt[26], guards;
string s;
bool isGuard[26];
int main() {
  cin >> n >> k;
  cin >> s;
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'A']++;
  }
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'A']--;
    if (!isGuard[s[i] - 'A']) {
      guards++;
      isGuard[s[i] - 'A'] = true;
    }
    if (guards > k) {
      return cout << "YES" << endl, 0;
    }
    if (!cnt[s[i] - 'A']) {
      guards--;
      isGuard[s[i] - 'A'] = false;
    }
  }
  cout << "NO" << endl;
  return 0;
}
