#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  string s;
  cin >> s;
  unordered_map<char, long long> map;
  unordered_map<char, long long> check;
  for (long long i = 0; i < n; i++) {
    map[s[i]]++;
    check[s[i]] = 0;
  }
  long long open = 0, f = 1;
  for (long long i = 0; i < n; i++) {
    if (check[s[i]] == 0) {
      check[s[i]] = 1;
      open++;
    }
    if (open > m) {
      f = 0;
      break;
    }
    --map[s[i]];
    if (map[s[i]] == 0) {
      check[s[i]] = 0;
      open--;
    }
  }
  if (f == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
