#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int l = s.length();
  int f[l + 2];
  int a[26] = {0};
  int l1[1000005], l2[1000005];
  for (int i = 0; i <= l; i++) {
    f[i] = 0, l1[i] = 0, l2[i] = 0;
  }
  for (int i = 0; i < 26; i++) a[i] = 0;
  int flag = 0;
  for (int i = 0; i < l; i++) {
    if (a[s[i] - 'A'] == 0) {
      a[s[i] - 'A'] = 1;
      l1[i] = 1;
    }
  }
  for (int i = 0; i < 26; i++) a[i] = 0;
  for (int i = l - 1; i >= 0; i--) {
    if (a[s[i] - 'A'] == 0) {
      a[s[i] - 'A'] = 1;
      l2[i + 1] = -1;
    }
  }
  f[0] = l1[0];
  for (int i = 1; i <= l; i++) {
    f[i] = f[i - 1] + l1[i] + l2[i];
  }
  for (int i = 0; i <= l; i++) {
    if (f[i] > k) {
      flag = 1;
      break;
    }
  }
  if (flag == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
