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

import java.util.*;
import java.io.*;

public final class Main {

    public static class Interval{
        int start;
        int finish;
        int count;
        Interval(int start, int finish){
            count = 1;
            this.start = start;
            this.finish = finish;
        }
    }


    public static void main(String[] args) throws Exception {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int numGuests = Integer.parseInt(st.nextToken());
        int numGuards = Integer.parseInt(st.nextToken());

        String input = br.readLine();

        List<Interval> list = new ArrayList<>();
        Map<Character, Interval> map = new HashMap<>();
        for(int i = 0; i<numGuests; i++){
            char curChar = input.charAt(i);
            if(map.containsKey(curChar)){
                map.get(curChar).finish = i;
            }else{
                map.put(curChar, new Interval(i,i));
            }
        }

        for(Interval i : map.values()){
            list.add(i);
        }

        Collections.sort(list, new Comparator<Interval>() {
            @Override
            public int compare(Interval o1, Interval o2) {
                return o1.start - o2.start;
            }
        });

        Interval maxInterval = list.get(0);
        Interval prevInterval = list.get(0);
        int longestOverlapLength = 1;
        for(int i = 1; i<list.size(); i++){
            Interval currInterval = list.get(i);
            if(currInterval.start <= maxInterval.finish){
                maxInterval.count++;
                maxInterval.start = currInterval.start;
                maxInterval.finish = Math.min(currInterval.finish, maxInterval.finish);
                prevInterval = currInterval;
                longestOverlapLength = Math.max(longestOverlapLength, maxInterval.count);
            }else {
                maxInterval = prevInterval;
                if(currInterval.start <= maxInterval.finish){
                    maxInterval.count++;
                    maxInterval.start = currInterval.start;
                    prevInterval = currInterval;
                    longestOverlapLength = Math.max(longestOverlapLength, maxInterval.count);
                }else {
                    maxInterval = currInterval;
                }
            }
        }

        System.out.println(longestOverlapLength > numGuards ? "YES" : "NO");
    }
}
