#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int freA[26] = {0};
int freB[26] = {0};
int main() {
  string st;
  int n, k;
  cin >> n >> k;
  cin >> st;
  v.resize(st.size(), 0);
  for (int i = 0; i < st.size(); ++i) {
    if (freA[st[i] - 'A'] == 0) {
      v[i] = 1;
    }
    freA[st[i] - 'A']++;
  }
  for (int i = st.size() - 1; i >= 0; --i) {
    if (freB[st[i] - 'A'] == 0) {
      if (v[i] == 0)
        v[i] = -1;
      else
        v[i] = 2;
    }
    freB[st[i] - 'A']++;
  }
  int count = 0;
  bool ans = true;
  for (int i = 0; i < v.size(); ++i) {
    if (v[i] != 2)
      count += v[i];
    else
      count++;
    if (count > k) ans = false;
    if (v[i] == 2) count--;
  }
  if (ans)
    puts("NO");
  else
    puts("YES");
}
