#include <bits/stdc++.h>
using namespace std;
int a[26], m[26];
int main() {
  int n, b;
  cin >> n >> b;
  string s;
  cin >> s;
  for (char i = 'A'; i <= 'Z'; i++) {
    int x = i - 'A';
    a[x] = count(s.begin(), s.end(), i);
    m[x] = a[x];
  }
  int t = 0;
  for (int i = 0; i < n; i++) {
    int x = s[i] - 'A';
    if (a[x] == m[x]) {
      t++;
    }
    a[x]--;
    if (t > b) {
      cout << "YES";
      return 0;
    }
    if (a[x] == 0) {
      t -= 1;
    }
  }
  cout << "NO";
}
