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.awt.geom.*;
import java.io.*;
import java.math.*;

public class Main
{

  public static void main(String[] args) throws Exception
  {
    long startTime = System.nanoTime();
    int n=in.nextInt();
    int k=in.nextInt();
    char [] c=in.next().toCharArray();
    HashMap<Character,Integer> track=new HashMap<Character,Integer> ();
    for(int i=0;i<c.length;i++)
    {
        Integer temp=track.get(c[i]);
        track.put(c[i],temp==null ? 1 : temp+1);
    }
    Set<Character> opened=new HashSet<Character>();
    for(int i=0;i<c.length;i++)
    {
        if(opened.contains(c[i]))
        {
            if(track.get(c[i])==1)
            {
                k++;
            }
            track.put(c[i],track.get(c[i])-1);
        }   
        else if(k>0)
        {
            opened.add(c[i]);
            k--;
            if(track.get(c[i])==1)
            {
                k++;
            }
            track.put(c[i],track.get(c[i])-1);            
        }
        else
        {
            out.println("YES");
            exit(0);
        }
    }
    out.println("NO");
    long endTime = System.nanoTime();
    err.println("Execution Time : +" + (endTime-startTime)/1000000 + " ms");
    exit(0);
  }

  static class InputReader
  {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble(){
           return Double.parseDouble(next());
        }
    }

    static void exit(int a)
    {
      out.close();
      err.close();
      System.exit(a);
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static OutputStream errStream = System.err;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);
    static PrintWriter err = new PrintWriter(errStream);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

}
