#include <bits/stdc++.h>
using namespace std;
char c[1000005];
map<char, long long> m;
set<char> w;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    m[s[i]] = i;
  }
  int change = 0;
  for (int i = 0; i < n; i++) {
    w.insert(s[i]);
    if (w.size() > k) {
      cout << "YES";
      change = 1;
      break;
    }
    if (m[s[i]] == i) w.erase(s[i]);
  }
  if (change == 0) cout << "NO";
}
