#include <bits/stdc++.h>
using namespace std;
bool dor[27];
int last[1000005];
int n, k;
string in;
void f() {
  for (int i = 0; i < 27; i++) {
    dor[i] = true;
  }
}
void f1() {
  for (int i = 0; i < n; i++) last[in[i] - 'A'] = i;
}
int main() {
  cin >> n >> k >> in;
  f();
  f1();
  for (int i = 0; i < n; i++) {
    if (dor[in[i] - 'A']) {
      if (k) {
        dor[in[i] - 'A'] = false;
        k--;
      } else {
        cout << "YES";
        return 0;
      }
    }
    if (last[in[i] - 'A'] == i) {
      k++;
    }
  }
  cout << "NO";
  return 0;
}
