#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, p[27], q[27] = {0};
  cin >> n >> k;
  getchar();
  string a;
  cin >> a;
  for (int i = 0; i < n; i++) {
    p[a[i] - 'A'] = i + 1;
  }
  int x = 0;
  for (int i = 0; i < n; i++) {
    if (q[a[i] - 'A'] == 0) {
      x++;
      q[a[i] - 'A'] = 1;
    }
    if (x > k) {
      cout << "YES\n";
      return 0;
    }
    if (p[a[i] - 'A'] == i + 1) {
      x--;
    }
  }
  cout << "NO\n";
}
