433 3
FZDDHMJGBZCHFUXBBPIEBBEFDWOMXXEPOMDGSMPIUZOMRZQNSJAVNATGIWPDFISKFQXJNVFXPHOZDAEZFDAHDXXQKZMGNSGKQNWGNGJGJZVVITKNFLVCPMZSDMCHBTVAWYVZLIXXIADXNYILEYNIQHKMOGMVOCWGHCWIYMPEPADSJAAKEGTUSEDWAHMNYJDIHBKHVUHLYGNGZDBULRXLSAJHPCMNWCEAAPYMHDTYWPADOTJTXTXUKLCHWKUSZRHEKQEFPVJEJJHRWCKYOIWALRTIBUMNOCRXLSIKQCJVQXEPGOHRUDJDKMUUUDORURWXJNVRVMNOUNRFKSVMTMZGOIJLXEPAMVGESOADYIGZXRBJDIWKNOWTCSROAQTBECHTOZVSQUOOJRZIBAUHMKAXDCIMDZJFMABGRNTGPUJAUNFPFWCJG
 6 2
ABCABC
 41 19
TMEYYIIELFDCMBDKWWKYNRNDUPRONYROXQCLVQALP
 5 2
ABACA
 377 3
EADADBBBBDEAABBAEBABACDBDBBCACAADBEAEACDEAABACADEEDEACACDADABBBBDDEECBDABACACBAECBADAEBDEEBDBCDAEADBCDDACACDCCEEDBCCBBCEDBECBABCDDBBDEADEDAEACDECECBEBACBCCDCDBDAECDECADBCBEDBBDAAEBCAAECCDCCDBDDEBADEEBDCAEABBDEDBBDDEAECCBDDCDEACDAECCBDDABABEAEDCDEDBAECBDEACEBCECEACDCBABCBAAEAADACADBBBBABEADBCADEBCBECCABBDDDEEBCDEBADEBDAAABBEABADEDEAEABCEEBEEDEAEBEABCEDDBACBCCADEBAAAAAEABABBCE
 3 26
AAB
 27 1
ABCDEFGHIJKLMNOPQRSTUVWXYZA
 73 2
DEBECECBBADAADEAABEAEEEAEBEAEBCDDBABBAEBACCBEEBBAEADEECACEDEEDABACDCDBBBD
 7 2
ABCDBCD
 5 1
AZAZA
 44 15
HGJIFCGGCDGIJDHBIBGAEABCIABIGBDEADBBBAGDFDHA
 5 2
ABCAB
 8 3
ABCBCDCA
 26 1
ABCDEFGHIJKLMNOPQRSTUVWXYZ

YES
 YES
 NO
 NO
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 YES
 NO
 NO

#include <bits/stdc++.h>
using namespace std;
long long ipow(long long base, long long exp) {
  long long result = 1;
  for (;;) {
    if (exp & 1) result = (result * base) % 1000000007;
    exp >>= 1;
    if (!exp) break;
    base = (base * base) % 1000000007;
  }
  return result;
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
long long fact(long long n) {
  if (n >= 1000000007) return 0;
  long long result = 1;
  for (int i = 1; i <= n; i++) result = (result * i) % 1000000007;
  return result;
}
bool is_prime(long long n) {
  if (n == 1) {
    return false;
  }
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
bool areRotations(string str1, string str2) {
  if (str1.length() != str2.length()) return false;
  string temp = str1 + str1;
  return (temp.find(str2) != string::npos);
}
bool pow2(long long x) { return x && (!(x & (x - 1))); }
long long maxXorSum(long long n, long long k) {
  if (k == 1) return n;
  long long res = 1;
  while (res <= n) res <<= 1;
  return res - 1;
}
long long mcost(long long a[], long long n) {
  long long y;
  if (n % 2 == 1)
    y = a[n / 2];
  else
    y = (a[n / 2] + a[(n - 2) / 2]) / 2;
  long long s = 0;
  for (long long i = 0; i < n; i++) s += abs(a[i] - y);
  return s;
}
long long largest_subarray(long long a[], long long n) {
  unordered_map<long long, long long> index;
  long long ans = 0;
  for (long long i = 0, j = 0; i < n; i++) {
    j = max(index[a[i]], j);
    ans = max(ans, i - j + 1);
    index[a[i]] = i + 1;
  }
  return ans;
}
long long b[101], sz;
pair<long long, long long> adj[101];
void dfs(int s) {
  b[s] = 1;
  for (int i = 1; i <= sz; i++) {
    if (!b[i] &&
        (adj[s].first == adj[i].first || adj[s].second == adj[i].second))
      dfs(i);
  }
}
void display(int a[], int n) {
  for (int i = 0; i < n; i++) {
    cout << a[i] << "  ";
  }
  cout << endl;
}
void per(int a[], int n) {
  long long d = 0;
  sort(a, a + n);
  do {
    long long s = 0, x = 1;
    for (long long i = 0; i < n; i++) {
      s += a[i];
      if (s == 0) {
        x = -1;
      }
    }
    if (x == 1) {
      cout << "YES" << endl;
      d = 1;
      for (long long i = 0; i < n; i++) {
        cout << a[i] << " ";
      }
      cout << endl;
      break;
    }
  } while (next_permutation(a, a + n));
  if (d == 0) {
    cout << "NO" << endl;
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool leftRotate(int a[], int d, int n) {
  d = d % n;
  int g_c_d = gcd(d, n);
  for (int i = 0; i < g_c_d; i++) {
    int temp = a[i];
    int j = i;
    while (1) {
      int k = j + d;
      if (k >= n) k = k - n;
      if (k == i) break;
      a[j] = a[k];
      j = k;
    }
    a[j] = temp;
  }
  long long s = 0, x = 1;
  for (long long i = 0; i < n; i++) {
    s += a[i];
    if (s == 0) {
      x = 0;
    }
  }
  if (x == 1) {
    cout << "YES" << endl;
    for (long long i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
    cout << endl;
    return true;
  }
  return false;
}
long long rec(long long n, long long k) {
  if (n == 1) {
    return 1;
  }
  if (k == 1) {
    return n;
  }
  return ((n + rec(n - 1, k - 1)) % 1000000007);
}
bool isPerfectSquare(long long x) {
  if (sqrt(x) * sqrt(x) == x) {
    return true;
  }
  return false;
}
bool isSubSequence(string str1, string str2, int m, int n) {
  int j = 0, x = 0, d = 0;
  if (str1[0] == str2[0]) {
    for (int i = 0; i < n && j < m; i++) {
      if (str1[j] == str2[i]) {
        j++;
      } else {
        d = i;
        break;
      }
    }
    if (j == m) {
      return true;
    }
    long long p = 9, v = 0;
    for (int i = n - 1; i >= d; i--) {
      if (v == 10 - j) {
        break;
      }
      if (str1[p] == str2[i]) {
        p--;
        v++;
      } else {
        break;
      }
    }
    if (v + j == 10) {
      return true;
    } else {
      return false;
    }
  } else {
    size_t found = str2.find(str1);
    if (found != string::npos && str1[9] == str2[n - 1]) {
      return true;
    } else {
      return false;
    }
  }
}
long long countDivisors(long long n) {
  long long cnt = 0;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        cnt++;
      else
        cnt = cnt + 2;
    }
  }
  return cnt;
}
float area(int x1, int y1, int x2, int y2, int x3, int y3) {
  return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0);
}
bool check(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
           int x, int y) {
  float A = area(x1, y1, x2, y2, x3, y3) + area(x1, y1, x4, y4, x3, y3);
  float A1 = area(x, y, x1, y1, x2, y2);
  float A2 = area(x, y, x2, y2, x3, y3);
  float A3 = area(x, y, x3, y3, x4, y4);
  float A4 = area(x, y, x1, y1, x4, y4);
  return (A == A1 + A2 + A3 + A4);
}
int main() {
  int t;
  t = 1;
  while (t--) {
    unordered_map<char, int> last_pos;
    unordered_set<char> active;
    int n, k;
    string s;
    cin >> n >> k >> s;
    for (int i = 0; i < n; i++) {
      last_pos[s[i]] = i;
    }
    for (int i = 0; i < n; i++) {
      active.insert(s[i]);
      if (active.size() > k) {
        cout << "YES" << endl;
        return 0;
      }
      if (last_pos[s[i]] == i) active.erase(s[i]);
    }
    cout << "NO" << endl;
  }
  return 0;
}
