#include <bits/stdc++.h>
const long double eps = 0.00000001;
const long long MOD = 1e9 + 7;
using namespace std;
map<char, int> cnt, guard;
bool ans;
int main() {
  fflush(stdin);
  cout << fixed, cout.precision(18);
  ios_base::sync_with_stdio(false);
  int n, i, j, k;
  string second;
  cin >> n >> k >> second;
  for (i = 0; i < n; ++i) cnt[second[i]]++;
  int cur = k;
  for (i = 0; i < n; ++i) {
    if (!guard[second[i]]) {
      k--;
      guard[second[i]] = 1;
    }
    if (k < 0) return cout << "YES", 0;
    cnt[second[i]]--;
    if (!cnt[second[i]]) k++;
  }
  cout << "NO";
}
