#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  vector<long long> arr(26, -1);
  for (int i = 0; i < n; i++) {
    long long ind = s[i] - 'A';
    arr[ind] = i;
  }
  vector<bool> flags(26, false);
  bool flag = true;
  long long count = 0;
  for (int i = 0; i < n; i++) {
    long long ind = s[i] - 'A';
    if (!flags[ind]) {
      flags[ind] = true;
      count++;
    }
    if (count > k) {
      flag = false;
    }
    if (arr[ind] == i) {
      count--;
    }
  }
  cout << (flag ? "NO" : "YES");
  return 0;
}
