#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 19;
bool vis[N];
map<char, int> mp;
int main() {
  int n, k;
  string str;
  cin >> n >> k >> str;
  for (int i = 0; i < n; ++i) {
    mp[str[i]]++;
  }
  char prev = str[0];
  mp[prev]--;
  vis[prev] = 1;
  if (mp[prev] > 0) k--;
  for (int i = 1; i < n; ++i) {
    if (!vis[str[i]] && !k) {
      cout << "YES" << '\n';
      return 0;
    } else if (vis[str[i]]) {
      mp[str[i]]--;
      if (mp[str[i]] == 0) k++;
    } else if (!vis[str[i]]) {
      vis[str[i]] = 1;
      mp[str[i]]--;
      if (mp[str[i]] > 0) k--;
    }
  }
  cout << "NO" << '\n';
}
