#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, i, k, ans = 0;
  set<char> st;
  map<char, long long> mp;
  cin >> n >> k;
  string s;
  cin >> s;
  for (i = 0; i < n; i++) {
    mp[s[i]]++;
  }
  for (i = 0; i < n; i++) {
    st.insert(s[i]);
    ans = max(ans, (long long)st.size());
    mp[s[i]]--;
    if (mp[s[i]] == 0) st.erase(s[i]);
  }
  if (ans > k)
    cout << "YES";
  else
    cout << "NO";
}
