One day Kefa found n baloons. For convenience, we denote color of i-th baloon as s_{i} — lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be upset, If he get two baloons of the same color. Kefa want to give out all baloons to his friends. Help Kefa to find out, can he give out all his baloons, such that no one of his friens will be upset — print «YES», if he can, and «NO», otherwise. Note, that Kefa's friend will not upset, if he doesn't get baloons at all.


-----Input-----

The first line contains two integers n and k (1 ≤ n, k ≤ 100) — the number of baloons and friends.

Next line contains string s — colors of baloons.


-----Output-----

Answer to the task — «YES» or «NO» in a single line.

You can choose the case (lower or upper) for each letter arbitrary.


-----Examples-----
Input
4 2
aabb

Output
YES

Input
6 3
aacaab

Output
NO



-----Note-----

In the first sample Kefa can give 1-st and 3-rd baloon to the first friend, and 2-nd and 4-th to the second.

In the second sample Kefa needs to give to all his friends baloons of color a, but one baloon will stay, thats why answer is «NO».

Difficulty: EASY
Tags: Implementation

Complete search
Skill types: Complete search

Starter code:

Solutions:
tmp = input().split()
n = int(tmp[0])
k = int(tmp[1])
s = input()
alf = 'abcdefghijklmnopqrstuvwxyz'
flag = 0
for i in alf:
	if s.count(i) > k:
		flag += 1
if flag == 0:
	print('YES')
else:
	print('NO')


abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
num = {}
for i in abc:
	num[i] = 0
(n, k) = map(int, input().split())
s = input()
for i in s:
	if i in abc:
		num[i] += 1
mx = max(num.values())
if mx > k:
	print('NO')
else:
	print('YES')


import sys
(n, k) = map(int, input().split())
arr = input()
dic = {}
for i in arr:
	if i in dic:
		dic[i] = dic[i] + 1
	else:
		dic[i] = 1
for d in dic:
	if dic[d] > k:
		print('NO')
		sys.exit()
print('YES')


(n, k) = map(int, input().split())
s = input()
d = {}
for s_i in s:
	if s_i in d:
		d[s_i] += 1
	else:
		d[s_i] = 1
can = True
for (_, value) in d.items():
	if value > k:
		can = False
		break
if can:
	print('YES')
else:
	print('NO')


from math import sqrt

def main():
	(a, b) = [int(v) for v in input().split()]
	d = input()
	for c in set(d):
		if len([v for v in d if v == c]) > b:
			print('NO')
			return
	print('YES')
main()


(kball, kd) = map(int, input().split())
color = list(input())
balloons = {}
for i in range(kball):
	if color[i] not in balloons:
		balloons[color[i]] = 1
	else:
		balloons[color[i]] = balloons[color[i]] + 1
c = len(balloons)
d = set(color)
d = list(d)
for i in range(len(d)):
	a = balloons[d[i]]
	if a - kd > 0:
		print('NO')
		exit()
print('YES')


nk = list(map(int, input().split()))
s = str(input())
b = []
accept = 0
for i in range(nk[0]):
	if s[i] not in b:
		b.append(s[i])
		temp = 1
		for j in range(i + 1, nk[0]):
			if s[j] == s[i]:
				temp += 1
				if temp > nk[1]:
					accept = 1
if accept == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
count = 0
for i in s:
	d[i] = d.get(i, 0) + 1
for i in d:
	yes = False
	if d[i] <= k:
		yes = True
	else:
		print('NO')
		break
if yes:
	print('YES')


from sys import stdin

def main():
	n = [int(x) for x in stdin.readline().strip().split()]
	x = stdin.readline().strip()
	band = True
	for i in x:
		a = x.count(i)
		if n[1] % a == n[1]:
			band = False
	if band == False:
		print('NO')
	else:
		print('YES')
main()


(n, k) = map(int, input().split())
s = input()
a = []
for i in range(len(s)):
	a.append(s[i])
letters = [0] * 26
for i in range(len(s)):
	nomer = ord(a[i]) - 97
	letters[nomer] += 1
if max(letters) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = list(input())
g = list(set(s))
for i in g:
	if s.count(i) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = [int(x) for x in input().split()]
st = input()
s = []
f = True
for elem in st:
	s += elem
while s:
	cnt = 0
	et = s[0]
	i = 0
	while i < len(s):
		if s[i] == et:
			cnt += 1
			del s[i]
			i -= 1
		i += 1
	if cnt > k:
		f = False
if f:
	print('YES')
else:
	print('NO')


from collections import defaultdict
(n, k) = map(int, input().split())
counter = defaultdict(int)
for c in input():
	counter[c] += 1
print(['YES', 'NO'][len([1 for (c, v) in counter.items() if v > k]) > 0])


import sys
import math
import bisect
import itertools

def main():
	(n, m) = map(int, input().split())
	d = dict()
	for c in input():
		if c not in d:
			d[c] = 0
		d[c] += 1
	if max(list(d.values())) > m:
		print('NO')
	else:
		print('YES')
main()


(n, k) = map(int, input().split())
ns = {}
for c in input():
	if c in ns.keys():
		ns[c] += 1
	else:
		ns[c] = 1
for a in ns.values():
	if a > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
collors = set()
for i in s:
	collors.add(i)
for i in collors:
	if s.count(i) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
a = {}
flag = 1
for i in range(len(s)):
	ch = s[i]
	if ch not in a:
		a[ch] = 1
	else:
		a[ch] += 1
	if a[ch] > k:
		flag = 0
if flag == 0:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = list(input())
s1 = list(set(s))
d = {}
for x in range(len(s1)):
	d[s1[x]] = s.count(s1[x])
if k >= n:
	print('YES')
elif max(d.values()) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
d = dict()
for x in s:
	d.setdefault(x, 0)
	d[x] = d[x] + 1
p = d[s[0]]
b = True
for x in d:
	if d[x] > k != 0:
		b = False
		break
if b:
	print('YES')
else:
	print('NO')


(n, r) = map(int, input().split(' '))
s = str(input())
li = set(s)
li = list(li)
flag = 0
for i in range(0, len(li)):
	a = s.count(li[i])
	if a > r:
		flag = 1
		break
if flag == 1:
	print('NO')
else:
	print('YES')


from sys import stdin, stdout
(n, k) = [int(i) for i in stdin.readline().split()]
s = stdin.readline().strip()
letters = dict()
for i in s:
	if i in letters:
		letters[i] += 1
	else:
		letters[i] = 1
maximum = max(letters.values())
if k < maximum:
	stdout.write('NO\n')
else:
	stdout.write('YES\n')


(n, k) = (int(x) for x in input().split())
st = input()
arr = [0 for x in range(200)]
ans = 'YES'
for i in range(len(st)):
	a = ord(st[i])
	arr[a] += 1
	if arr[a] > k:
		ans = 'NO'
		break
print(ans)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
from collections import defaultdict
(n, k) = get_int_list()
d = defaultdict(int)
s = get_string()
for i in range(n):
	d[s[i]] += 1
if max(d.values()) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
l = list(s)
d = {}
for i in l:
	if i in d:
		d[i] = d[i] + 1
	else:
		d[i] = 1
f = 0
for i in d:
	if d[i] > k:
		print('NO')
		f = 1
		break
if f == 0:
	print('YES')


q = input().split()
n = int(q[0])
k = int(q[1])
a = input()
flag = True
for i in range(n):
	kol = 0
	for j in range(n):
		if a[i] == a[j]:
			kol += 1
	if kol > k:
		flag = False
		break
if flag == True:
	print('YES')
else:
	print('NO')


from collections import Counter
(n, a) = list(map(int, input().split(' ')))
b = input()
c = Counter(b)
for y in list(c.values()):
	if y > a:
		print('NO')
		exit()
print('YES')


(n, k) = map(int, input().split())
base = ord('a')
counts = [0] * 26
mc = 0
for c in input():
	ind = ord(c) - base
	counts[ind] += 1
	if counts[ind] > mc:
		mc = counts[ind]
print(('NO', 'YES')[mc <= k])


(n, k) = map(int, input().split())
s = input()
a = [0] * 26
for p in s:
	a[ord(p) - ord('a')] += 1
for i in range(26):
	if a[i] > k:
		print('NO')
		exit()
print('YES')


alpha = [chr(ord('a') + i) for i in range(26)]
(n, k) = map(int, input().split())
s = input()
arr = [s.count(alpha[i]) for i in range(26)]
print('YES' if max(arr) <= k else 'NO')


(m, k1) = map(int, input().split())
ans = list(input())
bans = list(set(ans))
for i in range(len(bans)):
	if ans.count(bans[i]) > k1:
		print('NO')
		exit()
print('YES')


__author__ = 'Dilshod'
(n, m) = list(map(int, input().split()))
s = input()
a = list(set(s))
for i in range(len(a)):
	b = s.count(a[i])
	if b > m:
		print('NO')
		exit()
print('YES')


(n, k) = input().split()
s = input()
from collections import Counter
c = Counter(s)
if c.most_common(1)[0][1] > int(k):
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
a = list(input())
y = 0
for i in range(0, len(a)):
	if a.count(a[i]) > k:
		y = 1
if y == 0:
	print('YES')
else:
	print('NO')


(n, k) = list(map(int, input().split()))
s = input()
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in alpha:
	if s.count(i) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = (int(x) for x in input().split())
st = input()
d = {}
for ch in st:
	d[ch] = d.get(ch, 0) + 1
bad = False
for key in d:
	if d[key] > k:
		bad = True
		break
if bad:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
a = [0] * 27
bl = True
for i in s:
	t = ord(i) - ord('a')
	a[t] += 1
	if a[t] > k:
		bl = False
		break
if not bl:
	print('NO')
else:
	print('YES')


import sys
from bisect import bisect_left, bisect_right
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10
from itertools import permutations
inf = float('inf')
mod = 1000000007
mini = 1000000007

def ncr(n, r):
	d = 10 ** 9 + 7
	num = fact(n)
	den = fact(r) * fact(n - r) % d
	den = pow(den, d - 2, d)
	return num * den % d

def sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return lst

def binary(number):
	result = 0
	while number:
		result = result + 1
		number = number & number - 1
	return result

def calculate_factors(n):
	hh = [1] * (n + 1)
	p = 2
	while p * p < n:
		if hh[p] == 1:
			for i in range(p * 2, n, p):
				hh[i] = 0
		p += 1
	total = 1
	for p in range(2, n + 1):
		if hh[p] == 1:
			count = 0
			if n % p == 0:
				while n % p == 0:
					n = int(n / p)
					count += 1
				total *= count + 1
	return total

def prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			factors.add(n // i)
			n = n // i
			factors.add(i)
	if n > 1:
		factors.add(n)
	return factors

def isPrime(n):
	if n == 2 or n == 3:
		return True
	if n % 2 == 0 or n < 2:
		return False
	for i in range(3, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True

def solve(n):
	if n == 1:
		return 1
	p = 2
	while p * p <= n:
		if n % p == 0:
			return n // p
		p = p + 1
	return False

def expo(x, n):
	result = 1
	while n > 1:
		if n & 1:
			n = n - 1
			result = result * x
		else:
			n = n // 2
			x = x * x
	return result * x

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(n, k) = get_ints()
string = input()
mydict = dict()
for i in string:
	mydict[i] = mydict.get(i, 0) + 1
flag = 0
for i in mydict:
	if mydict[i] > k:
		flag = 1
		break
if flag == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
l = sorted(input())
if k >= n:
	print('YES')
else:
	s = set(l)
	t = 0
	for x in s:
		t = l.count(x)
		if t > k:
			print('NO')
			break
	else:
		print('YES')


(n, m) = [int(i) for i in input().split()]
s = str(input())
d = set(s)
ans = 'YES'
for i in d:
	if s.count(i) > m:
		ans = 'NO'
		break
print(ans)


from collections import Counter

def solve(n, k, a):
	c = Counter(a)
	maxi = max(c.items(), key=lambda x: x[1])[1]
	return 'YES' if maxi <= k else 'NO'

def main():
	(n, k) = list(map(int, input().split()))
	a = input()
	print(solve(n, k, a))
main()


x = input().split(' ')
y = input()
n = int(x[0])
k = int(x[1])
x = [0] * 26
for c in y:
	x[ord(c) - 97] += 1
for i in x:
	if i > k:
		print('NO')
		exit()
print('YES')


(a, b) = list(map(int, input().split()))
s = input()
sl = {}
fl = True
for i in range(len(s)):
	if not s[i] in sl:
		sl[s[i]] = 1
	else:
		sl[s[i]] = sl[s[i]] + 1
	if sl[s[i]] > b:
		fl = False
		break
if fl == True:
	print('YES')
else:
	print('NO')


import sys
from collections import Counter
(n, k) = map(int, input().split())
if max(Counter(list(input())).values()) > k:
	print('NO')
else:
	print('YES')


(balls, friends) = map(int, input().split())
colors = input()
s = {}
count_yes = 0
count_no = 0
for i in colors:
	if i not in s:
		s[i] = 1
	else:
		s[i] += 1
for j in s:
	if s[j] <= friends:
		count_yes += 1
	else:
		count_no += 1
if count_no >= 1:
	print('NO')
else:
	print('YES')


(a, b) = map(int, input().split())
l = list(input())
s = list(set(l))
f = 0
for x in range(len(s)):
	if l.count(s[x]) > b:
		print('NO')
		f = 1
		break
if f == 0:
	print('YES')


(n, m) = map(int, input().split())
a = list(input())
k = set(a)
f = 0
for i in k:
	b = a.count(i)
	if b > m:
		print('NO')
		f = 0
		break
	else:
		f = 1
if f == 1:
	print('YES')


(n, k) = input().split()
(n, k) = (int(n), int(k))
s = input()
f = [0 for i in range(0, 26)]
for i in s:
	f[ord(i) - ord('a')] += 1
out = 'YES'
for i in range(0, 26):
	if f[i] > k:
		out = 'NO'
		break
print(out)


(n, k) = map(int, input().split())
s = input()
for i in s:
	if s.count(i) > k:
		print('NO')
		exit()
print('YES')


(a, b) = map(int, input().split())
c = input()
d = {}
for i in c:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
t = 0
for i in d.keys():
	if d[i] > t:
		t = d[i]
if t > b:
	print('NO')
else:
	print('YES')


from collections import Counter
k = input()
k = int(k.split()[1])
ballons = input()
count = Counter(ballons)
if count.most_common()[0][1] > k:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
st = input()
a = [0] * 28
for i in range(len(st)):
	a[ord(st[i]) - 97] += 1
if max(a) <= k:
	print('YES')
else:
	print('NO')


[n, k] = list(map(int, input().split(' ')))
a = input()
for c in a:
	if a.count(c) > k:
		print('NO')
		exit(0)
print('YES')


def string(k, s, d):
	for i in d.keys():
		if d[i] > k:
			return 'No'
	return 'Yes'
(a, k) = map(int, input().split())
s = input()
d = dict()
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
print(string(k, s, d))


(n, k) = map(int, input().split())
s = input()
a = [0] * 26
for c in s:
	a[ord(c) - ord('a')] += 1
	if a[ord(c) - ord('a')] > k:
		print('NO')
		exit(0)
print('YES')


(n, k) = list(map(int, input().split()))
s = list(input())
unique = set(s)
count = {}
for i in s:
	count[i] = count.get(i, 0) + 1
values = [count[c] for c in unique]
values.sort(reverse=True)
assign = [[] for i in range(k)]
each = n // k
rem = n % k
for i in range(k):
	for j in range(each):
		for v in range(len(values)):
			if values[v] > 0 and v not in assign[i]:
				assign[i].append(v)
				values[v] -= 1
				break
for v in range(len(values)):
	while values[v] > 0:
		got = False
		for i in range(k):
			if v not in assign[i]:
				assign[i].append(v)
				values[v] -= 1
				got = True
				break
		if got == False:
			break
ans = True
for v in range(len(values)):
	if values[v] > 0:
		ans = False
		break
if ans == True:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
color = list(input())
flag = False
dictx = {}
for i in color:
	if i in dictx.keys():
		dictx[i] += 1
	else:
		dictx[i] = 1
for j in dictx.keys():
	if dictx[j] > k:
		flag = True
		break
	else:
		continue
if flag:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
a = input()
b = [0] * 123
for i in a:
	b[ord(i)] += 1
if max(b) > k:
	print('NO')
else:
	print('YES')


(n, b) = map(int, input().split())
a = input()
s = 0
for i in a:
	if a.count(i) > s:
		s = a.count(i)
if s <= b:
	print('YES')
else:
	print('NO')


from string import ascii_lowercase
(n, k) = (int(x) for x in input().split())
s = input()
print('YES' if all((s.count(c) <= k for c in ascii_lowercase)) else 'NO')


(n, k) = map(int, input().split())
a = list(input())
a.sort()
c = [1]
j = 0
for i in range(n - 1):
	if a[i] == a[i + 1]:
		c[j] += 1
	else:
		c.append(1)
		j += 1
c.sort()
if c[-1] > k:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
baloons = input()
cnt = dict()
for c in baloons:
	if c not in cnt:
		cnt[c] = 1
	else:
		cnt[c] += 1
if max(cnt.values()) > k:
	print('NO')
else:
	print('YES')


(n, k) = input().strip().split()
n = int(n)
k = int(k)
s = input()
l = len(s)
x = [0] * 26
if not s.isupper():
	for i in range(l):
		x[ord(s[i]) - 97] += 1
else:
	for i in range(l):
		x[ord(s[i]) - 65] += 1
p = 0
for i in range(26):
	if x[i] / k > 1:
		print('NO')
		break
	else:
		p += 1
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
for i in range(ord('a'), ord('z') + 1):
	if s.count(chr(i)) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
d = {}
for i in input():
	if d.get(i):
		d[i] += 1
	else:
		d[i] = 1
mx = 0
for x in d:
	mx = max(mx, d[x])
if mx <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = list(input())
b = {}
for i in a:
	if i not in b:
		b[i] = 1
	else:
		b[i] += 1
print('YES' if max(b.values()) <= k else 'NO')


(n, k) = map(int, input().split(' '))
b = input()
hash = [0] * 26
for x in range(0, len(b)):
	hash[ord(b[x]) - 97] += 1
flg = 0
for x in range(0, 26):
	if hash[x] > k:
		flg = 1
		break
if flg == 0:
	print('YES\n')
else:
	print('NO\n')


(n, k) = map(int, input().split(' '))
s = input()
l = []
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(0, 26):
	l.append(s.count(alpha[i]))
if max(l) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
ans = [0] * 26
for i in range(len(s)):
	ans[ord(s[i]) - 97] += 1
if max(ans) > k:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
s = input()
counts = [s.count(ch) for ch in set(s)]
if len(list(filter(lambda x: x > k, counts))) > 0:
	print('NO')
else:
	print('YES')


def check():
	for i in range(26):
		if s.count(chr(97 + i)) > k:
			return False
	return True
(n, k) = map(int, input().split())
s = input()
if check():
	print('YES')
else:
	print('NO')


import re
(_, a) = map(int, input().split())
s = input()
b = set([i for i in s])
t = 1
for i in b:
	if len(re.findall(i, s)) > a:
		t = 0
		break
if t == 0:
	print('NO')
else:
	print('YES')


def solve(c, k):
	for x in c.keys():
		if c[x] > k:
			return False
	return True

def main():
	(n, k) = map(int, input().split())
	s = list(input())
	c = {}
	for x in s:
		c[x] = c.get(x, 0) + 1
	if solve(c, k):
		print('YES')
	else:
		print('NO')
main()


(n, k) = map(int, input().split())
color = list(input())
color.sort()
color.append('-1')
maxseq = 0
cnt = 1
pre = color[0]
for i in range(1, n + 1):
	if color[i] == color[i - 1]:
		cnt += 1
	else:
		maxseq = max(maxseq, cnt)
		cnt = 1
if maxseq > k:
	print('NO')
else:
	print('YES')


f = [0] * 26
(n, k) = map(int, input().split())
s = input()
l = 0
for i in range(n):
	f[ord(s[i]) - ord('a')] += 1
for i in f:
	if i > k:
		l = 1
if l == 1:
	print('NO')
else:
	print('YES')


(n, k) = input().split(' ')
n = int(n)
k = int(k)
s = str(input())
l = list()
for c in s:
	if c in l:
		continue
	if s.count(c) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = list(input())
g = 0
j = 0
m = []
for i in range(n):
	if s[i] in m:
		g += 1
	else:
		m += [str(s[i])]
		l = s.count(str(s[i]))
		if l > k:
			print('NO')
			j += 1
			break
if j == 0:
	print('YES')


(n, k) = map(int, input().split(' '))
d = {x: 0 for x in range(0, 26)}
solved = True
for x in list(input()):
	d[ord(x) - ord('a')] += 1
	if d[ord(x) - ord('a')] > k:
		solved = False
if solved:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
colors = input()
freq = [0] * 26
flag = 0
for i in range(len(colors)):
	freq[ord(colors[i]) - 97] += 1
for i in range(len(colors)):
	if freq[ord(colors[i]) - 97] > k:
		flag = 1
		break
if flag == 0:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout
import bisect
import math
from collections import deque, Counter
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def issum(l, x):
	c = 0
	i = 0
	j = len(l) - 1
	while i < j:
		a = l[i] + l[j]
		if a > x:
			j -= 1
		elif a < x:
			i += 1
		else:
			c += 1
			i += 1
			j -= 1
	return c

def solve():
	c = 0
	(n, k) = mp()
	s = input()
	d = Counter(s)
	for i in d:
		if d[i] > k:
			pr('NO')
			return
	pr('YES')
for _ in range(1):
	solve()


(n, k) = map(int, input().split())
colors = input()
freq = {}
for c in colors:
	if c in list(freq.keys()):
		freq[c] += 1
	else:
		freq[c] = 1
if max(list(freq.values())) > k:
	print('NO')
else:
	print('YES')


(n, m) = map(int, input().split())
a = input()
lis = [0 for i in range(150)]
flag = 0
for i in range(len(a)):
	lis[ord(a[i])] += 1
	if lis[ord(a[i])] > m:
		flag = 1
		print('NO')
		break
if flag != 1:
	print('YES')


(n, m) = map(int, input().split())
a = list(input())
b = list(set(a))
x = [a.count(b[i]) for i in range(len(b))]
if max(x) > m:
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
s = input()
from collections import Counter as C
c = C(s)
f = 1
for i in c:
	if c[i] > k:
		f = 0
		print('NO')
		break
if f:
	print('YES')


(n, k) = map(int, input().split())
s = input()
count = [0] * 26
for i in s:
	count[ord(i) - 97] += 1
print('NO' if max(count) > k else 'YES')


from collections import defaultdict
(n, k) = map(int, input().split())
s = input()
visited = set()
gen = defaultdict()
for i in s:
	if i in visited:
		gen[i] += 1
		if gen[i] > k:
			print('NO')
			break
	else:
		gen[i] = 1
		visited.add(i)
else:
	print('YES')


(n, k) = map(int, input().split())
s = list(str(input()))
p = list(set(s))
m = 0
for i in range(len(p)):
	if s.count(p[i]) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
let = {}
for i in s:
	if i not in let.keys():
		let[i] = 1
	else:
		let[i] += 1
for n in let.values():
	if n > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
a = input()
a = list(a)
count = []
for i in a:
	count.append(a.count(i))
if max(count) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
s1 = set(s)
flag = 0
for i in s1:
	c = s.count(i)
	if c > k:
		flag = 1
		print('no')
		break
if flag == 0:
	print('yes')


(n, k) = map(int, input().split())
l = input()
p = set(l)
t = 0
for i in p:
	a = l.count(i)
	if a > k:
		t = 1
		break
if t == 0:
	print('YES')
else:
	print('NO')


(x, y) = map(int, input().split())
a = input()
d = {}
z = []
for i in range(len(a)):
	if a[i] in z:
		d[a[i]] = d[a[i]] + 1
	else:
		z.append(a[i])
		d[a[i]] = 1
max = d[a[0]]
for i in d:
	if d[i] > max:
		max = d[i]
if y >= max:
	print('YES')
else:
	print('NO')


import sys
raw_data = []
for line in sys.stdin:
	new = line.strip('\n')
	raw_data.append(new)
	if len(raw_data) == 2:
		break
nk = raw_data[0].split(' ')
n = nk[0]
k = nk[1]
color = raw_data[1]
colors = {}
for letter in color:
	if letter in colors:
		colors[letter] += 1
	else:
		colors[letter] = 1
yes = 0
no = 0
for entry in colors:
	if colors[entry] > int(k):
		no += 1
	else:
		yes += 1
if no == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
c = dict()
for x in s:
	if not x in c:
		c[x] = 1
	else:
		c[x] += 1
no = False
for x in c:
	if c[x] > k:
		print('NO')
		no = True
		break
if not no:
	print('YES')


from sys import stdin
from sys import stdout
(n, k) = [int(x) for x in stdin.readline().split()]
s = stdin.readline().strip()
s = list(s)
c = set(s)
f = {x: 0 for x in c}
for l in s:
	f[l] += 1
ans = True
for q in c:
	ans = ans and f[q] <= k
stdout.write('{}\n'.format('YES' if ans else 'NO'))


import sys
import math
q = 1
for a0 in range(q):
	(n, k) = map(int, input().split(' '))
	arr = input().strip()
	b = {}
	for char in arr:
		if char not in b:
			b[char] = 1
		else:
			b[char] += 1
	flag = True
	for (key, value) in b.items():
		if value > k:
			flag = False
			break
	if flag == False:
		print('NO')
	else:
		print('YES')


(n, k) = map(int, input().split())
s = input()
print('NO' if any((s.count(l) > k for l in set(s))) else 'YES')


(n, k) = map(int, input().split())
a = input()
a = a.lower()
f = [0] * 26
for i in a:
	f[ord(i) - 97] += 1
if max(f) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
t = list(input())
t.sort()
s = 1
ma = 0
for i in range(1, len(t)):
	if t[i] == t[i - 1]:
		s += 1
	else:
		s = 1
	if s > ma:
		ma = s
if ma <= k:
	print('YES')
else:
	print('NO')


from collections import defaultdict

def failed():
	print('NO')
	exit()

def passed():
	print('YES')
	exit()
(baloons, friends) = map(int, input().split())
types = defaultdict(int)
for x in list(input()):
	types[x] += 1
if max(types.values()) > friends:
	failed()
else:
	passed()


(n, k) = map(int, input().split())
l = list(input())
d = {}
for x in l:
	d[x] = d.get(x, 0) + 1
	if d[x] > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = input().split()
(n, k) = map(int, [n, k])
s = input()
A = []
for i in s:
	A.append(i)
n1 = A.count(max(set(A), key=A.count))
if n1 > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = [i for i in input()]
s.sort()
ok = True
for i in range(26):
	cnt = s.count(chr(97 + i))
	if cnt > k:
		ok = False
		break
if ok:
	print('YES')
else:
	print('NO')


from collections import Counter
(b, f) = map(int, input().split())
s = Counter(input())
for i in s:
	if s[i] > f:
		print('NO')
		exit(0)
print('YES')


def list_input():
	return list(map(int, input().split()))

def map_input():
	return map(int, input().split())

def map_string():
	return input().split()
(n, k) = map_input()
s = input()
ans = 0
for i in s:
	ans = max(ans, s.count(i))
if ans <= k:
	print('YES')
else:
	print('NO')


a = input()
a = a.split(' ')
b = input()
c = []
k = 0
for i in range(len(b)):
	c.append(b[i])
for i in range(len(c)):
	p = c.count(c[i])
	if p > int(a[1]):
		k = p
if k > int(a[1]):
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().strip().split(' ')]
f = [0 for i in range(26)]
s = input().strip()
for i in s:
	f[ord(i) - ord('a')] = f[ord(i) - ord('a')] + 1
if max(f) > k:
	print('NO')
else:
	print('YES')


(bl, fr) = map(int, input().split())
colr = [c for c in input().replace('', ' ').strip().split()]
(chd, toP) = ([], 0)
for i in colr:
	if i not in chd:
		chd += [i]
		if colr.count(i) > fr:
			toP = 1
			break
print('NO' if toP == 1 else 'YES')


(colors, friends) = map(int, input().split())
s = list(input())
c = 0
m = 0
for i in s:
	m = max(s.count(i), m)
print('YES' if m <= friends else 'NO')


(n, k) = list(map(int, input().strip().split()))
a = input()
s = set(a)
for i in s:
	if a.count(i) == 1:
		pass
	elif a.count(i) > 1 and a.count(i) <= k:
		pass
	else:
		print('NO')
		break
else:
	print('YES')


(n, k) = [int(x) for x in input().split()]
data = input()
data = list(data)
x = set(data)
flag = True
for i in x:
	if data.count(i) > k:
		print('NO')
		flag = False
		break
if flag == True:
	print('YES')


def happy_friends(string):
	balls = []
	colors = [0] * (ord('z') + 1)
	for value in string:
		colors[ord(value)] += 1
	for value in range(ord('a'), len(colors)):
		if colors[value] > 0 and colors[value] > friends:
			balls.append('NO')
		elif colors[value] > 0 and colors[value] <= friends:
			balls.append('YES')
	if 'NO' in balls:
		return 'NO'
	else:
		return 'YES'
(number_of_balls, friends) = map(int, input().split())
string = input().lower()
print(happy_friends(string))


(n, k) = list(map(int, input().split()))
s = list(input())
cnt = {}
for c in s:
	if c in cnt:
		cnt[c] += 1
	else:
		cnt[c] = 1
ans = 'YES'
for v in list(cnt.values()):
	if k < v:
		ans = 'NO'
		break
print(ans)


from collections import defaultdict

def solve():
	(_, c) = map(int, input().rstrip().split())
	ls = list(input().strip())
	counts = defaultdict(int)
	for char in ls:
		counts[char] += 1
	return max(counts.values()) <= c
if solve():
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
listA = [0] * 26
for i in range(len(s)):
	listA[ord(s[i]) - 97] += 1
listA.sort(reverse=True)
goodFl = 'YES'
for i in range(26):
	if listA[i] > k:
		goodFl = 'NO'
		break
	elif listA[i] == 0:
		break
print(goodFl)


(n, k) = input().split()
k = int(k)
s = input()
from collections import Counter
vals = Counter(s)
vals = vals.values()
x = max(vals)
if x > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
d = dict()
arr = input()
for i in range(len(arr)):
	if arr[i] in d:
		d[arr[i]] += 1
		if d[arr[i]] > k:
			print('NO')
			break
	else:
		d[arr[i]] = 1
else:
	print('YES')


(bal, friends) = map(int, input().split())
balls = input()
l = set(balls)
for x in l:
	if balls.count(x) > friends:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
c = {}
for i in s:
	c[i] = c.get(i, 0) + 1
m = max(c.values())
if m > k:
	print('NO')
else:
	print('YES')


numbers = input()
(balloons, friends) = numbers.split(' ')
friends = int(friends)
string = input()
z = 0
for _ in string:
	r = string.count(_)
	if r > friends:
		z += 1
		break
if z == 0:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout
import string
(n, k) = map(int, stdin.readline().rstrip().split())
s = list(stdin.readline().rstrip())
happy = True
for letter in s:
	if s.count(letter) > k:
		print('NO')
		happy = False
		break
if happy:
	print('YES')


l = [int(e) for e in input().split()]
n = l[0]
k = l[1]
ch = input()
i = 0
verif = True
while verif == True and i < len(ch):
	if ch.count(ch[i]) > k:
		verif = False
	else:
		i += 1
if verif:
	print('YES')
else:
	print('NO')


import collections
(n, k) = map(int, input().split())
s = input()
c = collections.Counter(s)
t = c.most_common(1)
maxi = max(t[0][1], k)
if maxi > k:
	print('NO')
else:
	print('YES')


(m, k) = map(int, input().strip().split())
s = input().strip()
m = {}
for i in s:
	if m.__contains__(i):
		m[i] += 1
	else:
		m[i] = 1
fl = True
for a in m:
	if m[a] > k:
		fl = False
		break
if fl:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
for i in range(n):
	if s.count(s[i]) > k:
		flag = 1
		break
	else:
		flag = 0
if flag == 0:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())
text = input()
fl = 1
for i in set(text):
	if text.count(i) > b:
		fl = 0
		break
print('YES' if fl else 'NO')


(n, k) = map(int, input().split())
s = input()
se = set(s)
tr = True
rest = 0
for i in se:
	t = s.count(i)
	if t > k:
		tr = False
if tr:
	print('YES')
else:
	print('NO')


(b, c) = map(int, input().split())
a = input()
d = {}
g = []
for i in a:
	d[i] = d.get(i, 0) + 1
for j in d:
	if d[j] > c:
		g.append('n')
	else:
		g.append('y')
if 'n' in g:
	print('NO')
else:
	print('YES')


a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
s = input()
c = set(s)
qanak = 0
for i in c:
	if s.count(i) <= a[1]:
		qanak += 1
		continue
if qanak == len(c):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
for ch in s:
	d.setdefault(ch, 0)
	d[ch] += 1
print(('NO', 'YES')[max(d.values()) <= k])


s = input().split()
n = int(s[0])
k = int(s[1])
string = input()
count = [string.count(c) for c in string]
if max(count) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
maps = {}
an = 0
S = input()
for s in S:
	if s not in maps:
		maps[s] = 1
	else:
		maps[s] += 1
	an = max(an, maps[s])
if an > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
gg = 0
letter_occurance = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for letter in alphabet:
	occurance = s.count(letter)
	letter_occurance.append(occurance)
for i in letter_occurance:
	if i > k:
		gg += 1
if gg > 0:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, k) = list(map(int, input().split()))
colors = input()
d = Counter(colors)
for (color, i) in list(d.items()):
	if i > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split(' '))
s = input()
d = {}
for i in s:
	d.update({i: d.get(i, 0) + 1})
m = 0
for j in d:
	m = max(m, d[j])
print('YES') if m <= k else print('NO')


def main():
	(N, K) = map(int, input().split())
	S = input()
	s = sorted(S)
	dup = 1
	for i in range(1, N):
		if s[i] == s[i - 1]:
			dup += 1
		else:
			if dup > K:
				ans = 'NO'
				break
			dup = 1
	else:
		if dup > K:
			ans = 'NO'
		else:
			ans = 'YES'
	print(ans)
main()


import sys
(n, k) = map(int, input().split())
s = input()
h = set(s)
for i in h:
	if s.count(i) > k:
		print('NO')
		sys.exit()
print('YES')


(n, k) = map(int, input().split())
s = list(input())
c = 0
for i in set(s):
	if s.count(i) > k:
		c += 1
if c != 0:
	print('NO')
else:
	print('YES')


d = {}
(n, k) = map(int, input().split())
s = input()
for i in s:
	d[i] = d.get(i, 0) + 1
otvet = 0
for i in d:
	if d[i] > k:
		otvet += 1
if otvet > 0:
	print('NO')
else:
	print('YES')


from collections import Counter

def solve(k, s):
	if Counter(s).most_common(1)[0][1] > k:
		return 'no'
	return 'yes'
(n, k) = [int(i) for i in input().split()]
s = input()
print(solve(k, s))


(x, y) = map(int, input().split())
pup = input()
z = list(pup)
w = dict.fromkeys(z, 0)
for i in z:
	w[i] += 1
flag = 0
for i in w:
	if w[i] > y:
		print('NO')
		flag = 1
		break
if flag == 0:
	print('YES')


(n, k) = map(int, input().split())
a = list(input())
flag = True
for i in set(a):
	if a.count(i) > k:
		flag = False
		break
print('YES' if flag else 'NO')


(n, k) = map(int, input().split())
s = list(input())
print('NO' if any([s.count(i) > k for i in s]) else 'YES')


from collections import Counter
(n, k) = map(int, input().split(' '))
m = Counter(input())
result = True
for key in m:
	if m[key] > k:
		result = False
if result:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = input()
c = [0] * 26
for i in a.lower():
	if 'a' <= i <= 'z':
		nomber = ord(i) - 97
		c[nomber] += 1
if max(c) > k:
	print('NO')
else:
	print('YES')


def inp():
	return map(int, input().split())
(n, k) = inp()
(s, hash) = (input(), dict())
for i in s:
	if i not in hash:
		hash[i] = 0
	hash[i] += 1
print('YNEOS'[max(hash.values()) > k::2])


from collections import Counter
(n, f) = list(map(int, input().split()))
s = input()
d = dict(Counter(s))
mm = max(list(d.values()))
if mm <= f:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = input()
m = [0] * 26
p = 0
for i in a:
	h = ord(i) - ord('a')
	m[h] += 1
for i in m:
	if i > k:
		p = 1
		break
if p == 1:
	print('No')
else:
	print('Yes')


(n, k) = [int(i) for i in input().split()]
str = input()
ans = 'YES'
for lit in str:
	if str.count(lit) > k:
		ans = 'NO'
		break
print(ans)


(a, b) = map(int, input().split())
c = {}
d = input()
for x in d:
	if d.count(x) > b:
		break
if d.count(x) > b:
	print('NO')
else:
	print('YES')


R = lambda : map(int, input().split())
(n, k) = R()
s = input()
val_dict = {}
for i in s:
	if i in val_dict:
		val_dict[i] += 1
	else:
		val_dict[i] = 1
for key in val_dict.values():
	if key - k > 0:
		print('NO')
		break
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
S = input()
K = list(set([i for i in S]))
kk = 0
for i in K:
	if S.count(i) // k == 0 or (S.count(i) // k == 1 and S.count(i) % k == 0):
		kk = 0
	else:
		kk = 1
		break
if kk == 0:
	print('YES')
else:
	print('NO')


from collections import Counter
(n, k) = map(int, input().split())
print('YES' if all((i <= k for i in Counter(input()).values())) else 'NO')


s = input().split(' ')
a = int(s[0])
b = int(s[1])
c = input()
dc = {}
for i in c:
	dc[i] = 0
for i in c:
	dc[i] += 1
bad = False
for i in dc:
	if dc[i] > b:
		print('NO')
		bad = True
		break
if bad == False:
	print('YES')


(n, k) = map(int, input().split())
balls = {}
for i in input():
	if i not in balls:
		balls[i] = 1
	else:
		balls[i] += 1
print('YES' if max(balls.values()) <= k else 'NO')


(n, m) = list(map(int, input().split()))
s = input()
mp = {}
for i in s:
	if i not in mp:
		mp.update({i: 1})
	else:
		mp[i] += 1
maxl = 0
for i in mp:
	maxl = max(maxl, mp[i])
if maxl > m:
	print('NO')
else:
	print('YES')


import functools
import operator
(balls, pals) = map(int, input().split())
colors = input()
balls_colors = {}
for color in colors:
	if color in balls_colors:
		balls_colors[color] += 1
	else:
		balls_colors[color] = 1
if sum((1 for x in balls_colors.values() if x <= pals)) == len(balls_colors):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = list(input())
b = [0] * 26
c = []
for i in a:
	nomer = ord(i) - 97
	b[nomer] += 1
while 0 in b:
	b.remove(0)
if max(b) > k:
	print('NO')
else:
	print('YES')


slots = {}
for i in range(26):
	slots[chr(ord('a') + i)] = 0
(n, k) = map(int, input().split(' '))
for i in input():
	slots[i] += 1
for friend in range(k):
	for x in slots:
		if slots[x]:
			slots[x] -= 1
			n -= 1
print('YES' if n == 0 else 'NO')


(n, k) = map(int, input().split())
s = input()
s1 = list(set(s))
for i in s1:
	if s.count(i) > k:
		print('NO')
		exit()
print('YES')


from collections import Counter as C
from sys import stdin as si

def bazinga():
	(a, b) = map(int, si.readline().split())
	d = C(list(si.readline().strip()))
	for (k, v) in d.items():
		if v > b:
			return 'NO'
	else:
		return 'YES'
print(bazinga())


(n, k) = list(map(int, input().split()))
colors = list(input())
colmap = {}
are_friends_happy = True
for i in colors:
	if i in colmap:
		colmap[i] += 1
	else:
		colmap[i] = 1
	if colmap[i] > k:
		are_friends_happy = False
		break
if are_friends_happy:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
l = []
s = input()
for i in s:
	l.append(i)
mn = set(s)
for i in mn:
	r = l.count(i)
	if k % r == 0:
		continue
	elif k % r != 0 and k < r:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = str(input())
color = [0] * 26
for i in s:
	nom = ord(i) - 97
	color[nom] += 1
for i in range(len(color)):
	if color[i] <= k:
		otvet = 1
	else:
		otvet = 0
		break
if otvet == 1:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = [0] * 26
s = input()
for i in s:
	a[ord(i) - ord('a')] += 1
a.sort(reverse=True)
if a[0] <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = dict()
m = len(s) // k
for i in range(n):
	if s[i] in d:
		d[s[i]] += 1
	else:
		d[s[i]] = 1
s = 0
for key in d:
	d[key] -= min(d[key], k)
	s += d[key]
if s > 0:
	print('NO')
else:
	print('YES')


(n_balloon, n_people) = [int(x) for x in input().split()]
s_balloon = input()
d = {}
for c in s_balloon:
	if c in d:
		d[c] += 1
	else:
		d[c] = 1
if max(d.values()) > n_people:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
t = list(input())
b = list(set(t))
r = 0
for i in b:
	if t.count(i) > k:
		print('NO')
		break
	else:
		r += 1
if r == len(b):
	print('YES')


(n, k) = [int(x) for x in input().split()]
dict = {}
color = list(input())
for i in range(n):
	if dict.get(color[i]) == None:
		dict[color[i]] = 1
	else:
		dict[color[i]] += 1
if max(dict.values()) > k:
	print('NO')
	exit()
print('YES')


(n, m) = map(int, input().split())
a = list(input())
for i in set(a):
	if a.count(i) > m:
		print('NO')
		exit()
print('YES')


from collections import defaultdict
(n, k) = map(int, input().split())
s = input()
rec = defaultdict(int)
for i in range(n):
	rec[s[i]] += 1
if max(rec.values()) <= k:
	print('YES')
else:
	print('NO')


def solve(n: int, k: int, s: str) -> str:
	for letter in set(s):
		if s.count(letter) > k:
			return 'NO'
	return 'YES'
(n, k) = map(int, input().split())
s = input()
print(solve(n, k, s))


b = int(input().split()[1])
c = input()
print(['YES', 'NO'][max((c.count(i) for i in set(c))) > b])


def main():
	(n, k) = (int(x) for x in input().split())
	s = input()
	print(solver(k, s))

def solver(k, s):
	letters = 26
	letterCounts = [0] * letters
	for c in s:
		index = ord(c) - ord('a')
		letterCounts[index] += 1
	for count in letterCounts:
		if count > k:
			return 'NO'
	return 'YES'
main()


n = input().split()
k = int(n[1])
n = int(n[0])
s = [0] * n
strings = input()
for i in range(len(s)):
	s[i] = strings[i]
a = [0] * k
for i in range(len(a)):
	a[i] = str(a[i])
flag = 0
for i in range(n):
	for e in range(k):
		if a[e].find(s[i]) == -1:
			a[e] = a[e] + s[i]
			break
		if e == k - 1:
			flag = 1
if flag == 0:
	print('YES')
if flag == 1:
	print('NO')


(n, k) = map(int, input().split())
s = str(input())
m = []
for a in s:
	for b in range(n):
		m.append(s.count(a))
if max(m) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
d = dict()
for c in s:
	if c in d:
		d[c] += 1
	else:
		d[c] = 1
for c in d:
	if d[c] > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
l = []
for i in range(n):
	l.append(s[i])
l.sort()
c = 1
m = 1
for i in range(n - 1):
	if l[i] == l[i + 1]:
		c += 1
	else:
		if c > m:
			m = c
		c = 1
if c > m:
	m = c
if m > k:
	print('NO')
else:
	print('YES')


from collections import Counter
(_, k) = map(int, input().split())
print('NO' if max(Counter(input()).values()) > k else 'YES')


(n, k) = (int(x) for x in input().strip().split())
a = input()
b = False
for i in a:
	if a.count(i) > k:
		b = True
if not b:
	print('YES')
else:
	print('NO')


b_a = input()
s = input()
(balao, amigos) = b_a.strip().split(' ')
n = int(balao)
k = int(amigos)
baloes_unicos = []
cond = True
if n >= 1 and n <= 100 and (k >= 1) and (k <= 100) and (n == len(s)):
	for i in s:
		if i not in baloes_unicos:
			baloes_unicos += [i]
	for i in baloes_unicos:
		if k < s.count(i):
			print('NO')
			cond = False
			break
	if cond:
		print('YES')


line = input().split(' ')
(n, k) = (int(line[0]), int(line[1]))
characters = input()
counter = {}
for c in characters:
	if c in counter:
		counter[c] += 1
		if counter[c] > k:
			print('NO')
			exit()
	else:
		counter[c] = 1
print('YES')


(a, b) = map(int, input().split())
s = str(input())
print('YES' if max([s.count(i) for i in s]) <= b else 'NO')


(a, b) = map(int, input().split())
l = input()
for i in 'qwertyuiopasdfghjklzxcvbnm':
	if l.count(i) > b:
		print('NO')
		break
	elif i == 'm':
		print('YES')


(x, y) = input().split()
x = int(x)
y = int(y)
s = input()
r = set(s)
maxi = 0
for t in r:
	k = s.count(t)
	if maxi < k:
		maxi = k
if maxi <= y:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
good = True
for x in s:
	if s.count(x) > k:
		good = False
		break
if good:
	print('Yes')
else:
	print('NO')


import sys
input = sys.stdin.readline
alpha = 'abcdefghijklmnopqrstuvwxyz'
count = {}
for i in alpha:
	count[i] = 0
(n, f) = map(int, input().split())
balls = list(input().strip('\n'))
for i in range(n):
	count[balls[i]] += 1
max = 0
for i in alpha:
	if count[i] > max:
		max = count[i]
if max > f:
	print('NO')
else:
	print('YES')


(n, m) = [int(i) for i in input().split()]
s = input()
k = list(set(s))
ans = 'YES'
for i in range(len(k)):
	k[i] = s.count(k[i])
	if k[i] > m:
		ans = 'NO'
		break
print(ans)


msg = input().split()
n = int(msg[0])
k = int(msg[1])
msg = input()
msg = sorted(msg)
count = {}
for char in msg:
	if char not in count:
		count[char] = 1
	else:
		count[char] += 1
if max(count.values()) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
s = ''.join(sorted(s))
i = 0
fg = True
c = 0
while i < n and fg:
	c = 0
	a = s[i]
	while i < n and s[i] == a:
		c = c + 1
		i = i + 1
	if c > k:
		fg = False
if fg:
	print('YES\n')
else:
	print('NO\n')


(n, k) = map(int, input().split())
(s, q) = (sorted(' '.join(input()).split()), 0)
w = sorted(list(set(s)))
for i in w:
	q = max(s.count(i), q)
print('NO' if q > k else 'YES')


(n, k) = list(map(int, input().split()))
s = input()
d = {}
for x in s:
	d[x] = d.get(x, 0) + 1

def f():
	for y in d.values():
		if y > k:
			print('NO')
			return
	print('YES')
f()


import collections
(n, k) = list(map(int, input().split()))
s = list(input())
balls = collections.defaultdict(int)
for x in s:
	balls[x] += 1
if max(balls.values()) <= k:
	print('YES')
else:
	print('NO')


import math as mt
import sys, string
input = sys.stdin.readline
from collections import defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
(n, k) = M()
s = input().strip()
s = list(s)
d = defaultdict(int)
for i in range(len(s)):
	d[s[i]] += 1
s = list(set(s))
for i in range(len(s)):
	if d[s[i]] > k:
		print('NO')
		exit()
print('YES')


(n, k) = map(int, input().split())
has = dict()
daf = list(input())
for i in range(n):
	if daf[i] in has.keys():
		has[daf[i]] += 1
	else:
		has[daf[i]] = 1
for x in has.values():
	if x > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = list(map(int, input().split()))
s = list(input())
if max([s.count(k) for k in set(s)]) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
arr = input()
maxi = 0
for i in range(26):
	temp = arr.count(chr(ord('a') + i))
	if temp > maxi:
		maxi = temp
if maxi > k:
	print('NO')
else:
	print('YES')


(n, k) = [int(_) for _ in input().split()]
s = input()
count = [s.count(x) for x in 'qwertyuiopasdfghjklzxcvbnm']
if max(count) > k:
	print('NO')
else:
	print('YES')


(n, m) = map(int, input().split())
s = input()
b = []
count = []
for i in s:
	if i in b:
		count[b.index(i)] += 1
	else:
		b.append(i)
		count.append(1)
if m == 0:
	print('YES')
	exit(0)
for i in count:
	if i > m:
		print('NO')
		break
else:
	print('YES')


[n, k] = list(map(int, input().split()))
balloons = input()
from collections import Counter
c = dict(Counter(balloons))
b = True
for i in c:
	if c[i] > k:
		b = False
		break
if b:
	print('YES')
else:
	print('NO')


from collections import defaultdict
(n, k) = map(int, input().split())
colors = input()
count = defaultdict(lambda : 0)
for color in colors:
	count[color] += 1
m = max(count.values())
result = 'YES' if m <= k else 'NO'
print(result)


(t, q) = map(int, input().split())
f = input()
f = list(f)
g = []
for i in f:
	e = f.count(i)
	g.append(e)
gh = max(g)
if gh <= q:
	print('YES')
else:
	print('NO')


(b, n) = map(int, input().split())
s = input()
print(('YES', 'NO')[max((s.count(c) for c in set(s))) > n])


(n, b) = map(int, input().split())
a = input()
count = [0] * 26
nomer = 0
e = []
for i in a:
	nomer = ord(i) - 97
	count[nomer] += 1
for i in count:
	if i != 0:
		e = e + [i]
if max(e) <= b:
	print('YES')
else:
	print('NO')


from math import *
import itertools as it
from collections import *
EPS = 1e-09

def get_int():
	return int(input().strip())

def get_string():
	return input().strip()

def get_array():
	return list(map(int, input().strip().split(' ')))

def print_array(a, glue=' '):
	print(glue.join(map(str, a)))

def print_grid(grid, glue=' '):
	for row in grid:
		print_array(row, glue)

def solve():
	(n, k) = get_array()
	counter = Counter(get_string())
	return 'YES' if all((counter[x] <= k for x in counter)) else 'NO'
ntest = 1
for _ in range(ntest):
	print(solve())


(x, y) = map(int, input().split())
dic = {}
a = list(input())
for i in range(x):
	if a[i] not in dic.keys():
		dic[a[i]] = 1
	else:
		dic[a[i]] += 1
print('NO' if max(dic.values()) > y else 'YES')


(n, k) = map(int, input().split())
s = input()
print(['YES', 'NO'][s.count(max(set(s), key=s.count)) > k])


[n, k] = [int(x) for x in input().split()]
colors = input()
i = 0
alphabet = []
while colors != '':
	alphabet.append(colors.count(colors[0]))
	colors = colors.replace(colors[0], '')
	i += 1
i = len(alphabet) - 1
if k < max(alphabet):
	print('NO')
else:
	print('YES')


n = input().split()
k = int(n[1])
n = int(n[0])
s = input()
m = [0 for i in range(26)]
j = True
a = 'a'
for i in range(n):
	m[ord(s[i]) - ord(a)] += 1
	if m[ord(s[i]) - ord(a)] > k:
		j = False
if j == True:
	print('YES')
else:
	print('NO')


inp = input().split()
n = int(inp[0])
k = int(inp[1])
s = input()
dic = dict()
for i in range(n):
	dic[s[i]] = dic.get(s[i], 0) + 1
flag = 1
for key in dic:
	if dic[key] > k:
		flag = 0
		break
if flag == 1:
	print('YES\n')
else:
	print('NO\n')


(n, k) = map(int, input().split())
s = input()
str1 = 'abcdefghijklmnopqrstuvwxyz'
for i in str1:
	c = 0
	for j in s:
		if i == j:
			c = c + 1
	if c > k:
		print('NO')
		break
else:
	print('YES')


from collections import Counter
(balls_nr, friends_nr) = (int(x) for x in input().split())
ball_idx___color = input()
if max(Counter(ball_idx___color).values()) > friends_nr:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
(count, max, q) = (0, 0, s[0])
while q in s:
	count = s.count(q)
	if count > max:
		max = count
	s = s.replace(q, '')
	if s.isalpha() == True:
		q = s[0]
		count = 0
	else:
		break
if max > k:
	print('NO')
else:
	print('YES')


(n, k) = input().split()
a = input()
n = int(n)
balls = [0] * 26
k = int(k)
x = 0
for i in a:
	nomber_of_color = ord(i) - 97
	balls[nomber_of_color] += 1
for i in balls:
	if i > k:
		x += 1
if x > 0:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, m) = map(int, input().split())
s = input()
d = Counter(s)
a = max(d.values())
if a <= m:
	print('Yes')
else:
	print('No')


from collections import defaultdict
(n, k) = list(map(int, input().rstrip().split()))
s = input().rstrip(' ')
d = defaultdict(int)
for v in s:
	d[v] += 1
ok = True
for v in d.values():
	if v > k:
		ok = False
		break
if ok:
	print('YES')
else:
	print('NO')


def fu():
	(n, k) = map(int, input().split())
	s = str(input())
	a = [0] * 26
	for i in s:
		a[ord(i) - 97] += 1
	m = 0
	for i in range(26):
		if a[i] > k:
			m = 5
			return print('NO')
	if m != 5:
		return print('YES')
fu()


(n, k) = map(int, input().split())
l = input()
d = {}
for i in l:
	d[i] = d.get(i, 0) + 1
for i in d.values():
	if i > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split(' '))
s = input()
res = 0
for i in range(ord('a'), ord('z') + 1):
	res = max(res, s.count(chr(i)))
print(['NO', 'YES'][res <= k])


(n, k) = map(int, input().split())
good = 1
a = sorted(input())
for i in range(k, n):
	if a[i] == a[i - k]:
		good = 0
print(['NO', 'YES'][good])


(n, k) = map(int, input().split())
l = list(input())
lp = []
se = list(set(l))
for i in se:
	lp.append(l.count(i))
if max(lp) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
j = list(set(s))
flag = 0
for i in j:
	if s.count(i) > k:
		flag = 1
		break
if flag == 0:
	print('Yes')
else:
	print('No')


(n, k) = map(int, input().split())
balls = input()
dictory = dict()
number = 1
for ball in balls:
	if ball in dictory:
		dictory[ball] += 1
	else:
		dictory[ball] = 1
for i in set(balls):
	if k / dictory.get(i) < 1:
		number += 1
if number == 1:
	print('YES')
else:
	print('NO')


import sys

def solve(n, k, vals):
	counts = [0] * 26
	for val in vals:
		counts[ord(val) - ord('a')] += 1
	if max(counts) <= k:
		print('YES')
	else:
		print('NO')
inp = sys.stdin.readlines()
(n, k) = list(map(int, inp[0].split(' ')))
vals = inp[1].strip('\n')
solve(n, k, vals)


import math

def __starting_point():
	(n, k) = list(map(int, input().split()))
	s = input()
	s = list(s)
	ls = set(s)
	flag = 1
	for i in ls:
		if s.count(i) > k:
			flag = 0
	if flag:
		print('YES')
	else:
		print('NO')
__starting_point()


(a, b) = [int(s) for s in input().split()]
c = list(input())
max = 0
d = list(set(c))
for i in d:
	s = c.count(i)
	if max < s:
		max = s
if b >= max:
	print('Yes')
else:
	print('No')


(n, k) = map(int, input().split())
a = list(map(str, input()))
f = set(a)
m = 0
for i in f:
	if a.count(i) > m:
		m = a.count(i)
print('NO' if m > k else 'YES')


(n, k) = map(int, input().split())
s = list(input())
l = [s.count(str(i)) for i in s]
if max(l) > k:
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
s = input()
for i in range(ord('a'), ord('z') + 1):
	x = 0
	for j in s:
		if ord(j) == i:
			x += 1
	if x > k:
		print('NO')
		exit(0)
print('YES')


(n, k) = map(int, input().split())
s = input()
bukvi = []
guys = [''] * k
c = 0
for i in s:
	if not i in bukvi:
		bukvi += i
for i in bukvi:
	if s.count(i) > k:
		answer = 'NO'
		break
	else:
		answer = 'YES'
print(answer)


(n, k) = map(int, input().split())
from collections import Counter
s = list(input())
c = Counter(s)
print('YES' if max((c[i] for i in c)) <= k else 'NO')


(n, k) = map(int, input().split())
s = input()
a = [0] * k
g = 0
for i in s:
	c = s.count(i)
	if g < c:
		g = c
if g > k:
	print('No')
else:
	print('YES')


(n, k) = map(int, input().split())
from collections import Counter
s = Counter(list(input()))
for i in s:
	if s[i] / k > 1:
		print('NO')
		exit()
print('YES')


(ball, friends) = list(map(int, input().split()))
colors = input()
d = {}
if ball <= friends:
	print('YES')
else:
	for c in colors:
		d[c] = d.get(c, 0) + 1
		if d[c] > friends:
			print('NO')
			exit(0)
	print('YES')


(n, k) = list(map(int, input().split()))
s = str(input())
b = 0
ip = [0 for i in range(256)]
for i in s:
	ip[ord(i) - 97] += 1
for i in ip:
	if i > k:
		print('NO')
		b = 1
		break
if b == 0:
	print('YES')


(n, k) = map(int, input().split())
string = input()
if k >= n:
	print('YES')
else:
	dic = {}
	for i in string:
		if i not in dic:
			dic[i] = 1
		else:
			dic[i] += 1
	count = 0
	length = len(dic)
	for i in dic:
		if dic[i] > k:
			break
		count += 1
	if count == length:
		print('YES')
	else:
		print('NO')


(n, k) = map(int, input().split())
s = input()
r = [0] * 26
y = 0
for i in s:
	nomer = ord(i) - 97
	r[nomer] += 1
for i in range(len(r)):
	if r[i] > k and r[i] != 0:
		y += 1
if y > 0:
	print('NO')
elif y == 0:
	print('YES')


(n, k) = map(int, input().split())
s = input()
output = 0
for ch in 'abcdefghijklmnopqrstuvwxyz':
	if s.count(ch) > k:
		print('NO')
		exit()
print('YES')


(n, k) = map(int, input().split())
s = input()
cnt = [0] * 26
for ch in s:
	cnt[ord(ch) - 97] += 1
if max(cnt) > k:
	print('NO')
else:
	print('YES')


(x, y) = map(int, input().split())
z = list(input())
for i in range(x):
	if z.count(z[i]) > y:
		print('NO')
		exit()
print('YES')


(n, m) = map(int, input().split())
s = input()
print('YES' if max([s.count(i) for i in s]) <= m else 'NO')


(bl, fr) = map(int, input().split())
colr = [c for c in list(input())]
chd = []
for i in colr:
	if i not in chd:
		chd += [i]
		if colr.count(i) > fr:
			break
print('NO' if colr.count(i) > fr else 'YES')


(a, b) = input().strip().split(' ')
(a, b) = [int(a), int(b)]
s = input()
ff = 1
x = [0 for _ in range(26)]
for i in s:
	x[ord(i) - ord('a')] += 1
for i in x:
	if i > b:
		ff = 0
		break
if ff:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = str(input())
l = len(a)
f = 1
for i in range(l):
	s = a.count(a[i])
	if s > k:
		f = 0
		break
if f == 0:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input().strip()
d = {}
for i in range(26):
	d[chr(ord('a') + i)] = 0
for i in s:
	d[i] += 1
arr = []
for i in d.keys():
	arr.append(d[i])
arr.sort(reverse=True)
arr.append(0)
summ = 0
for i in range(len(arr) - 1):
	summ += arr[i] - arr[i + 1]
if summ <= k:
	print('Yes')
else:
	print('No')


enter = input().split()
n = int(enter[0])
k = int(enter[1])
s = input()
colors = []
for i in s:
	colors.append(i)
output = 'YES'
while colors != []:
	color = colors[0]
	cont = 0
	for i in colors:
		if i == color:
			cont += 1
	for i in range(len(colors) - 1, -1, -1):
		if colors[i] == color:
			colors.remove(colors[i])
	if cont > k:
		output = 'NO'
		break
print(output)


(n, k) = [int(i) for i in input().split()]
m = input()
a = []
for i in range(len(m)):
	a.append(m.count(m[i]))
z = max(a)
if z > k:
	print('NO')
else:
	print('YES')


line = input()
s = input()
line = line.split(' ')
n = int(line[0])
k = int(line[1])
for i in range(0, len(s)):
	if s.count(s[i]) > k:
		f = False
		break
	else:
		f = True
if f == False:
	print('No')
else:
	print('Yes')


[n, k] = [int(x) for x in input().split()]
baloons = input()
alpha = {}
for letter in baloons:
	if letter not in alpha:
		alpha[letter] = 1
	else:
		alpha[letter] += 1
print(['YES', 'NO'][max(alpha.values()) > k])


(n, k) = [int(x) for x in input().split()]
l = list(input())
s = list(set(l))
f = -1
for i in s:
	count = 0
	for j in l:
		if i == j:
			count -= -1
	f = max(f, count)
if f > k:
	print('NO')
else:
	print('YES')


(N, K) = map(int, input().split())
S = input()
cc = [0] * 26
for c in S:
	v = ord(c) - ord('a')
	cc[v] += 1
	if cc[v] > K:
		print('NO')
		raise SystemExit
print('YES')


from collections import Counter
(n, k) = map(int, input().split())
d = dict(Counter(list(input())))
for v in list(d.values()):
	if v > k:
		print('NO')
		break
else:
	print('YES')


(_, k) = input().split()
k = int(k)
colors_count = 26 * [0]
a = ord('a')
is_possible = True
for color in input():
	index = ord(color) - a
	if index < 26:
		colors_count[index] += 1
		if colors_count[index] > k:
			is_possible = False
			break
if is_possible:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input().rstrip()
amount = [0] * 26
for i in range(n):
	amount[ord(s[i]) - ord('a')] += 1
max_a = 0
for i in range(26):
	max_a = max(max_a, amount[i])
if max_a > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
flag = True
for i in range(n):
	if s.count(s[i]) > k:
		flag = False
if flag:
	print('YES')
else:
	print('NO')


from collections import defaultdict
X = list(map(int, input().split()))
MyDict = defaultdict(int)
for i in list(input()):
	MyDict[i] += 1
print('NO' if sorted(MyDict.values(), reverse=True)[0] > X[1] else 'YES')


(n, m) = list(map(int, input().split()))
s = input()
count = {}
for val in s:
	if val not in count:
		count[val] = 0
	count[val] += 1
flag = 0
for item in count:
	if count[item] > m:
		flag = 1
		break
if flag == 0:
	print('YES')
else:
	print('NO')


(a, c) = map(int, input().split())
b = input()
for i in b:
	if b.count(i) > c:
		print('NO')
		exit()
print('YES')


(n, k) = map(int, input().split())
a = list(input())
a = a[:n]
b = set(a)
c = 0
while len(b) > 0 and c == 0:
	for i in range(len(b)):
		d = b.pop()
		if a.count(d) > k or c == 1:
			c = 1
		else:
			c = 0
if c == 0:
	print('YES')
else:
	print('NO')


n = list(map(int, input().split()))
b = input()
d = {}
l = []
for i in b:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for i in d.values():
	l.append(i)
if max(l) > n[1]:
	print('NO')
	exit()
print('YES')


(n, k) = map(int, input().split())
s = input()
dic = {}
for i in s:
	try:
		dic[i]
		dic[i] += 1
	except:
		dic[i] = 1
(l, f) = (dic.values(), 1)
for i in l:
	if i > k:
		f = 0
		break
if f:
	print('YES')
else:
	print('NO')


string = input().split(' ')
qtd = int(string[0])
amigos = int(string[1])
cores = input()
a = b = c = d = e = f = g = i2 = j = k = l = m = n = o = p = q = r = s = t = u = v = w = x = y = z = 0
h = 0
for i in range(qtd):
	if cores[i] == 'a':
		a = a + 1
	if cores[i] == 'b':
		b = b + 1
	if cores[i] == 'c':
		c = c + 1
	if cores[i] == 'd':
		d = d + 1
	if cores[i] == 'e':
		e = e + 1
	if cores[i] == 'f':
		f = f + 1
	if cores[i] == 'g':
		g = g + 1
	if cores[i] == 'h':
		h = h + 1
	if cores[i] == 'i':
		i2 = i2 + 1
	if cores[i] == 'j':
		j = j + 1
	if cores[i] == 'k':
		k = k + 1
	if cores[i] == 'l':
		l = l + 1
	if cores[i] == 'm':
		m = m + 1
	if cores[i] == 'n':
		n = n + 1
	if cores[i] == 'o':
		o = o + 1
	if cores[i] == 'p':
		p = p + 1
	if cores[i] == 'q':
		q = q + 1
	if cores[i] == 'r':
		r = r + 1
	if cores[i] == 's':
		s = s + 1
	if cores[i] == 't':
		t = t + 1
	if cores[i] == 'u':
		u = u + 1
	if cores[i] == 'v':
		v = v + 1
	if cores[i] == 'w':
		w = w + 1
	if cores[i] == 'x':
		x = x + 1
	if cores[i] == 'y':
		y = y + 1
	if cores[i] == 'z':
		z = z + 1
if a > amigos or b > amigos or c > amigos or (d > amigos) or (e > amigos) or (f > amigos) or (g > amigos) or (h > amigos) or (i2 > amigos) or (j > amigos) or (k > amigos) or (l > amigos) or (m > amigos) or (n > amigos) or (o > amigos) or (p > amigos) or (q > amigos) or (r > amigos) or (s > amigos) or (t > amigos) or (u > amigos) or (w > amigos) or (x > amigos) or (y > amigos) or (z > amigos):
	print('NO')
else:
	print('YES')


from collections import Counter
inp1 = input().split()
n = int(inp1[0])
k = int(inp1[1])
s = input()
myList = sorted(s)
newList = []
for i in myList:
	if i not in newList:
		newList.append(i)
d = 0
for j in range(len(newList)):
	num = myList.count(newList[j])
	if num > k:
		print('NO')
		d = 1
		break
if d == 0:
	print('YES')


from math import ceil

def f(n, k, s):
	d = {}
	for c in s:
		if not c in d:
			d[c] = 1
		else:
			d[c] += 1
	k_ = len(d)
	for i in d:
		if d[i] > k:
			print('NO')
			return
	print('YES')
(n, k) = tuple(map(int, input().split()))
s = input()
f(n, k, s)


(n, k) = map(int, input().split())
s = input()
count = [0] * 26
res = 'YES'
for i in s:
	count[ord(i) - 97] += 1
for i in range(26):
	if count[i] > k:
		res = 'NO'
print(res)


from math import ceil, sqrt, floor
import sys
(n, k) = map(int, input().split())
ballons = {}
for i in input():
	if i in ballons:
		ballons[i] += 1
	else:
		ballons[i] = 1
print(['NO', 'YES'][all([j <= k for (i, j) in ballons.items()])])


(n, k) = map(int, input().strip().split(' '))
s = input()
o = 0
for i in range(len(s)):
	b = s.count(s[i])
	if b > k:
		o = 1
		break
if o == 1:
	print('NO')
else:
	print('YES')


(n, m) = map(int, input().split())
s = input()
d = []
w = set(s)
for i in w:
	d.append(s.count(i))
if max(d) > m:
	print('NO')
else:
	print('YES')


firstRaw = input()
sFR = firstRaw.split()
balls = int(sFR[0])
friends = int(sFR[1])
secondRaw = input()
exit = 1
colors = list(secondRaw)
s_colors = set(colors)
total_colors = list(s_colors)
maximum = total_colors[0]
for i in range(0, len(total_colors)):
	if colors.count(total_colors[i]) > colors.count(maximum):
		maximum = total_colors[i]
	if colors.count(maximum) > friends:
		exit = 0
if exit == 0:
	print('No')
else:
	print('Yes')


(n, k) = map(int, input().split(' '))
balls = input()
letter = {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm'}
for i in letter:
	if balls.count(i) > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
l = set(s)
m = 0
for i in l:
	c = s.count(i)
	if c > m:
		m = c
if m > k:
	print('NO')
else:
	print('YES')


nk = list(map(int, input().split()))
colors = str(input())
possible = True
freq = [0] * 26
for lol in range(len(colors)):
	freq[ord(colors[lol]) - 97] += 1
for lol in range(26):
	if freq[lol] > nk[1]:
		possible = False
		break
if possible:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())
l = list(input())
s = list(set(l))
m = 0
for i in s:
	if l.count(i) > b:
		m = 1
		break
if m == 1:
	print('NO')
else:
	print('YES')


inp = [int(x) for x in input().split()]
(n, k) = (inp[0], inp[1])
s = input()
li = [0 for x in range(26)]
for c in s:
	li[ord(c) - ord('a')] += 1
ma = max(li)
if ma > k:
	print('NO')
else:
	print('YES')


from collections import Counter as cc
(n, m) = list(map(int, input().split()))
s = [i for i in input()]
c = cc(s)
if max(c.values()) > m:
	print('NO')
else:
	print('YES')


TAB = [int(i) for i in input().split()]
S = list(input())
B = set(S)
C = [S.count(i) for i in S]
if max(C) <= TAB[1]:
	print('YES')
else:
	print('NO')


(n, m) = list(map(int, input().split()))
s = input()
sets = set(s)
flag = 0
for i in sets:
	if s.count(i) > m:
		flag = 1
		print('NO')
		break
if flag == 0:
	print('YES')


import sys
import math
fin = sys.stdin
f = fin.readline().split(' ')
n = int(f[0])
k = int(f[1])
balls_string = fin.readline()
balls = {}
for i in balls_string:
	if i in balls.keys():
		balls[i] += 1
		continue
	balls.update({i: 1})
maxt = 0
for i in balls:
	if balls[i] > maxt:
		maxt = balls[i]
if maxt > k:
	print('NO')
else:
	print('YES')


(a, b) = map(int, input().split())
s = input()
letters = {}
for x in s:
	if not x in letters:
		letters[x] = 0
	letters[x] += 1
for x in letters.values():
	if x > b:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
line = input()
m = {}
for w in line:
	if w not in m:
		m[w] = 0
	m[w] += 1
l = -1
for v in m:
	l = max(l, m[v])
if l > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
mas = []
for i in range(26):
	mas.append(0)
for i in s:
	mas[ord(i) - 97] += 1
maxx = -1
for i in mas:
	if maxx < i:
		maxx = i
if maxx > k:
	print('No')
else:
	print('Yes')


d = {}
(n, k) = map(int, input().split())
s = input()
for i in s:
	d[i] = d.get(i, 0) + 1
m = max(d.values())
for key in d:
	if d[key] == m:
		if d[key] > k:
			print('NO')
		else:
			print('YES')
		break


import sys
numbers = ''
colors = ''
i = 0
for line in sys.stdin:
	i += 1
	if i == 1:
		numbers = line
	if i == 2:
		colors = line[:-1]
		break
numbers = numbers.split(' ')
balls_n = int(numbers[0])
friends_n = int(numbers[1])
color_types = {}
for c in colors:
	if c in color_types:
		color_types[c] += 1
	else:
		color_types[c] = 1
	if color_types[c] > friends_n:
		print('NO')
		sys.exit(0)
print('YES')


import sys
import collections
import math
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')
(n, k) = map(int, input().split())
s = input().split()
s = s[0]
counts = collections.defaultdict(int)
for i in s:
	counts[i] += 1
for i in range(k):
	for key in counts.keys():
		if counts[key] > 0:
			counts[key] -= 1
for key in counts.keys():
	if counts[key] > 0:
		print('NO')
		sys.exit(0)
print('YES')


(n, m) = map(int, input().split())
l = input()
l1 = [0] * 27
S = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(S)):
	l1[i] = l.count(S[i])
l1 = sorted(l1)
if m < l1[26]:
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
s = list(str(input()))
c = 0
for i in 'qwertyuiopasdffghjklzxcvbnm':
	c = max(s.count(i), c)
if k < c:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
s = input()
num = [0] * 26
for i in s:
	num[ord(i) - ord('a')] += 1
ans = True
for i in num:
	if i > k:
		ans = False
		break
if ans:
	print('YES')
else:
	print('NO')


(n, a) = map(int, input().split())
b = list((x for x in input()))
c = []
for x in range(int(a)):
	if len(b) == 0:
		break
	c.append(b[0])
	b.pop(0)
if n < a:
	n = a
for _ in range(n // a + 1):
	for y in range(len(c)):
		for x in b:
			if x not in c[y]:
				c[y] += x
				b.remove(x)
				break
b.append('')
if b[0] == '':
	print('YES')
else:
	print('NO')


(n, f) = map(int, input().split())
l = list(input())
p = []
for i in range(n):
	if l[i] not in p:
		p.append(l[i])
m = []
for i in range(len(p)):
	s = l.count(p[i])
	m.append(s)
c = 0
for i in range(len(m)):
	if m[i] > f:
		print('NO')
		break
	else:
		c += 1
		if c == len(m):
			print('YES')


(n, k) = input().split()
s = input()
n = int(n)
k = int(k)
s = str(s)
mas = list(s)
count = 0
isTrue = True
for i in range(0, n):
	if mas.count(mas[i]) > k:
		print('NO')
		isTrue = False
		break
if isTrue:
	print('YES')


(n, k) = map(int, input().split())
balls = input()
balls_dict = dict.fromkeys([chr(i) for i in range(97, 123)], 0)
for i in balls:
	balls_dict[i] += 1
numbers = balls_dict.values()
for i in numbers:
	if i / k > 1:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
flag = True
for c in s:
	if s.count(c) > k:
		flag = False
print('Yes' if flag else 'No')


(a, b) = map(int, input().split())
l = list(input())
x = set(l)
c = 0
for i in x:
	c = max(c, l.count(i))
if c > b:
	print('NO')
else:
	print('YES')


(n, k) = list(map(int, input().split()))
sl = list(input())
b = {}
for s in sl:
	if s in b.keys():
		b[s] += 1
	else:
		b[s] = 1
bl = b.values()
output = 'YES'
for bc in bl:
	if bc > k:
		output = 'NO'
print(output)


(n, k) = map(int, input().split())
a = input()
d = {}
count = 'YES'
for i in a:
	d[i] = d.get(i, 0) + 1
for i in d.values():
	if i - k > 0:
		count = 'NO'
print(count)


(n, k) = list(map(int, input().split()))
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
b = []
for i in d:
	b.append(d[i])
if max(b) > k:
	print('NO')
else:
	print('YES')


from operator import itemgetter
(n, k) = map(int, input().split())
s = list(input())
s.sort()
num = 1
num2 = 0
ans = 0
for i in range(1, n):
	if s[i] == s[i - 1]:
		num += 1
	else:
		num2 = max(num2, num)
		num = 1
num2 = max(num2, num)
ans = int(num2 <= k)
print('YES' * ans + 'NO' * (1 - ans))


def main():
	(n, k) = [int(x) for x in input().split()]
	data = input()
	_max = 0
	for val in set(data):
		cnt = data.count(val)
		if cnt > _max:
			_max = cnt
	print('YES' if _max <= k else 'NO')
main()


numbers = list(map(int, input().split()))
n = numbers[0]
k = numbers[1]
str1 = input()
flag = 0
for i in str1:
	if str1.count(i) > k:
		flag = 1
		break
if flag == 0:
	print('YES')
else:
	print('NO')


(N, K) = map(int, input().split())
s = input()
d = {}
for ch in s:
	d[ch] = d.get(ch, 0) + 1
for c in d.keys():
	if d[c] > K:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
a = 'YES'
for i in s:
	if s.count(i) > k:
		a = 'NO'
		break
print(a)


(n, k) = map(int, input().split())
good = 1
a = sorted(input())
for i in range(k, n):
	if a[i] == a[i - k]:
		good = 0
print(['No', 'Yes'][good])


(n, k) = map(int, input().split())
s = input()
d = dict()
for i in s:
	d[i] = d.get(i, 0) + 1
	if d[i] > k:
		print('NO')
		exit(0)
print('YES')


(n, k) = map(int, input().strip().split())
s = input()
s = sorted(s)
c = m = 0
j = s[0]
for i in s:
	if i == j:
		c += 1
	else:
		j = i
		c = 1
	if c > k:
		m = 1
		break
if m:
	print('No')
else:
	print('Yes')


(n, k) = map(int, input().split())
s = input()
s = sorted(s)
(cur_max, cur_min) = (1, 1)
for i in range(1, n):
	if s[i] == s[i - 1]:
		cur_min += 1
		if i == n - 1 and cur_min > cur_max:
			cur_max = cur_min
	else:
		if cur_min > cur_max:
			cur_max = cur_min
		cur_min = 1
if k >= cur_max:
	print('YES')
else:
	print('NO')


from collections import defaultdict
(n, k) = map(int, input().split())
buf = input()
bad = False
mp = defaultdict(int)
for ch in buf:
	mp[ch] += 1
	if mp[ch] > k:
		bad = True
		break
print('NO' if bad else 'YES')


(ball, friend) = input().split()
ball = int(ball)
friend = int(friend)
wow = input()
lis = [0] * 100
for i in wow:
	lis[ord(i) - 97] += 1
max = -1
for i in range(26):
	if lis[i] > max:
		max = lis[i]
if max > friend:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, k) = map(int, input().split(' '))
ss = list(input())
count = list(Counter(ss).values())
ok = True
for i in count:
	if not i <= k:
		ok = False
print('YES') if ok else print('NO')


def check():
	f = {}
	for c in s:
		f.update({c: f.get(c, 0) + 1})
	for c in s:
		if f[c] > k:
			return False
	return True
(n, k) = map(int, input().split())
s = input()
if check():
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
l = [0] * 26
f = 0
if n == 0:
	print('YES')
else:
	for i in s:
		l[ord(i) - 97] += 1
	for i in l:
		if i <= k:
			continue
		else:
			f += 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


(baloes, amigos) = input().split(' ')
amigos = int(amigos)
baloes = int(baloes)
string = input()
d = {}
for i in string:
	if i in d:
		if d[i] == amigos:
			print('NO')
			break
		else:
			d[i] = d[i] + 1
	else:
		d[i] = 1
else:
	print('YES')


(n, k) = map(int, input().split(' '))
s = input()
l = list(set(s))
count = []
for i in range(len(l)):
	count.append(s.count(l[i]))
	if count[i] > k:
		print('NO')
		c = 0
		break
	else:
		c = 1
if c > 0:
	print('YES')


import collections
(n, k) = list(map(int, input().split()))
words = input()
colors = collections.Counter(list(words))
friends = {}
for i in colors.values():
	if i > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
ss = set(s)
maxc = 0
for c in ss:
	maxc = max(maxc, s.count(c))
if maxc > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
a = []
for i in range(256):
	a.append(0)
for i in s:
	a[ord(i)] = a[ord(i)] + 1
ans = 0
for i in range(256):
	if a[i] > k:
		ans = 1
if ans == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = str(input())
m = []
for i in s:
	for j in range(n):
		m.append(s.count(i))
if max(m) > k:
	print('NO')
else:
	print('YES')


def sol():
	(n, k) = [int(num) for num in input().split(' ')]
	inp = input()
	d = {}
	for st in inp:
		try:
			d[st]
			d[st] += 1
		except:
			d[st] = 1
	for key in d:
		if d[key] > k:
			print('NO')
			return
	print('YES')
	return
sol()


(n, k) = map(int, input().split())
s = input()
c = [0] * 26
count_yes = 0
count_no = 0
for i in s:
	nomer = ord(i) - 97
	c[nomer] += 1
for j in range(len(c)):
	if c[j] <= k:
		count_yes += 1
	else:
		count_no += 1
if count_no > 0:
	print('NO')
else:
	print('YES')


(n, j) = map(int, input().split())
s = input()
res = 'YES'
for i in [s.count(k) for k in set(s)]:
	if i > j:
		res = 'NO'
		break
print(res)


(a, b) = map(int, input().split())
x = str(input())
for i in x:
	if x.count(i) > b:
		print('NO')
		exit()
print('YES')


(n, k) = list(map(int, input().split()))
a = input()
d = {}
for i in range(n):
	d[a[i]] = d.get(a[i], 0) + 1
f = 0
for i in d:
	if d[i] > k:
		f = 1
		break
if f:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
ar = [0] * 26
for b in s:
	ar[ord(b) - ord('a')] += 1
m = max(ar)
if m <= k:
	print('YES')
else:
	print('NO')


from sys import stdin
from collections import Counter
(N, K) = map(int, stdin.readline().split())
if max(Counter(stdin.readline().strip()).values()) <= K:
	print('YES')
else:
	print('NO')


import string as module
(n, k) = input().split()
(n, k) = (int(n), int(k))
string = input()
d = {letter: 0 for letter in module.ascii_lowercase}
for char in string:
	d[char] += 1
possible = True
for key in d.keys():
	if d[key] > k:
		possible = False
		break
if possible:
	print('YES')
else:
	print('NO')


a = input().split(' ')
b = input()
c = 'YES'
if len(b) >= 1:
	for i in range(0, len(b)):
		if b.count(b[i]) > int(a[1]):
			c = 'NO'
			break
		else:
			c = 'YES'
else:
	print('YES')
print(c)


(n, k) = map(int, input().split())
a = input()
o = []
NO = 'NO'
letters = [0] * 26
for i in a.lower():
	if i >= 'a' and i <= 'z':
		nomer = ord(i) - 97
		letters[nomer] += 1
for i in range(26):
	if letters[i] % k == 0 and letters[i] // k == 1 or letters[i] < k:
		letters[i] -= k
	else:
		letters[i]
for i in range(26):
	if letters[i] <= 1:
		o.append('Yes')
	else:
		o.append(NO)
if o.count('NO') >= 1:
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
s = input()
m = [0] * 1000
for c in s:
	m[ord(c)] += 1
if max(m) > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
d = {}
for i in s:
	d[i] = d.get(i, 0) + 1
f = 0
if k >= max(d.values()):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
l = list(input())
freq = [0] * 26
for i in range(len(l)):
	freq[ord(l[i]) - 97] += 1
if max(freq) <= k:
	print('YES')
else:
	print('NO')


from collections import Counter

def solve(n, k, a):
	c = Counter(a)
	maxi = c.most_common(1)[0][1]
	return 'YES' if maxi <= k else 'NO'

def main():
	(n, k) = list(map(int, input().split()))
	a = input()
	print(solve(n, k, a))
main()


(no_of_baloons, no_of_friends) = map(int, input().split())
coloured_baloons = input()
if len([i for i in set(coloured_baloons) if coloured_baloons.count(i) > no_of_friends]) >= 1:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
if max(map(lambda c: s.count(c), 'abcdefghijklmnopqrstuvwxyz')) > k:
	print('NO')
else:
	print('YES')


(n, k) = [int(y) for y in input().split(' ')]
s = [u for u in input()]
r = k
w = 0
k = list(set(s))
d = []
for i in range(len(k)):
	e = s.count(k[i])
	d.append(e)
for y in range(len(d)):
	if d[y] > r:
		w = 1
		print('NO')
		break
if w == 0:
	print('YES')


(n, k) = map(int, input().split())
l = list(input())
y = list(set(l))
x = []
for i in range(len(y)):
	x.append(l.count(y[i]))
for i in range(len(x)):
	if x[i] > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = [int(x) for x in input().split(' ')]
s = input()
ans = 'YES'
for char in s:
	if s.count(char) > k:
		ans = 'NO'
		break
print(ans)


(a, b) = map(int, input().split())
n = input()
k = 0
for i in n:
	if n.count(i) > b:
		k = k + 1
		break
if k == 0:
	print('YES')
else:
	print('NO')


from collections import Counter
(n, k) = map(int, input().split())
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
if k >= max(d.values()):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
g = 0
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for i in d.values():
	if i > k:
		g = 1
if g != 1:
	print('YES')
else:
	print('NO')


(ai, bi) = map(int, input().split())
stri = str(input())
a = stri.count('n')
b = stri.count('b')
c = stri.count('v')
d = stri.count('c')
e = stri.count('x')
f = stri.count('z')
g = stri.count('l')
h = stri.count('k')
i = stri.count('j')
j = stri.count('m')
k = stri.count('h')
l = stri.count('g')
m = stri.count('f')
n = stri.count('d')
o = stri.count('s')
p = stri.count('a')
q = stri.count('p')
r = stri.count('o')
s = stri.count('i')
t = stri.count('u')
u = stri.count('y')
v = stri.count('t')
w = stri.count('r')
x = stri.count('e')
y = stri.count('w')
z = stri.count('q')
if a > bi or b > bi or c > bi or (d > bi) or (e > bi) or (f > bi) or (g > bi) or (h > bi) or (i > bi) or (j > bi) or (k > bi) or (l > bi) or (m > bi) or (n > bi) or (o > bi) or (p > bi) or (q > bi) or (r > bi) or (s > bi) or (t > bi) or (u > bi) or (v > bi) or (w > bi) or (x > bi) or (y > bi) or (z > bi):
	print('NO')
else:
	print('YES')


(a, b) = eval(','.join(input().split()))
d = {}
s = input()
for i in s:
	d[i] = d.get(i, 0) + 1
max_ = 0
for key in d:
	if d[key] > max_:
		max_ = d[key]
if max_ > b:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
b1 = []
b2 = []
a = input()
for i in a:
	if not i in b1:
		b1.append(i)
		b2.append(1)
	else:
		b2[b1.index(i)] += 1
if max(b2) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = list(input())
nn = [0] * 26
i = 0
while i < len(s):
	ii = ord(s[i]) - 97
	nn[ii] += 1
	if nn[ii] > k:
		break
	i += 1
if i == len(s):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
x = input()
q = ''
for i in range(len(x)):
	if len(x) != n:
		q = 'NO'
		print('NO')
		break
	if x.count(x[i]) > k:
		q = 'NO'
		print('NO')
		break
if q != 'NO':
	print('YES')


(n, k) = map(int, input().split())
s = input()
d = dict()
for i in s:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
x = list(d.values())
for i in x:
	if i > k:
		print('NO')
		exit()
else:
	print('YES')


l = [0 for i in range(26)]
(n, k) = map(int, input().split())
s = str(input())
for c in s:
	l[ord(c) - 97] += 1
flag = True
for i in range(26):
	if l[i] > k:
		print('NO')
		exit()
print('YES')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(n, k) = LI()
	c = collections.Counter(S())
	if max(c.values()) > k:
		return 'NO'
	return 'YES'
print(main())


(n, m) = map(int, input().split())
l = input()
print('YES' if max([l.count(x) for x in l]) <= m else 'NO')


import sys
a = {}
line = input().split()
n = int(line[0])
k = int(line[1])
line = input()
for c in line:
	if c in a:
		a[c] = a[c] + 1
	else:
		a[c] = 1
flag = True
for i in a:
	if a[i] > k:
		flag = False
		break
if flag == True:
	print('YES')
else:
	print('NO')


a = input().split()
s = list(input())
d = {}
g = []
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
for j in d:
	g.append(d[j])
if max(g) <= int(a[1]):
	print('YES')
else:
	print('NO')


from sys import maxsize, stdout, stdin, stderr
mod = int(1000000000.0 + 7)
import re

def tup():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())

def lint():
	return [int(x) for x in stdin.readline().split()]

def S():
	return input().strip()

def grid(r, c):
	return [lint() for i in range(r)]

def debug(*args, c=6):
	print('\x1b[3{}m'.format(c), *args, '\x1b[0m', file=stderr)
from math import log2, sqrt
from collections import defaultdict
(n, k) = tup()
ls = S()
d = defaultdict(int)
f = True
for i in ls:
	d[i] += 1
	if d[i] > k:
		f = False
if f == False:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
data = input()
a = {}
for i in data:
	if i in a:
		a[i] += 1
	else:
		a[i] = 1
for i in a.values():
	if i > k:
		print('NO')
		break
else:
	print('YES')


a = [0] * 28
(n, k) = map(int, input().split())
s = str(input())
for i in s:
	a[ord(i) - ord('a')] += 1
if max(a) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
b = list(input())
a = {}
s = 0
for i in b:
	a[i] = a.get(i, 0) + 1
for i in a:
	if a[i] > s:
		s = a[i]
if s > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
d = dict.fromkeys(list('qwertyuiopasdfghjklzxcvbnm'), 0)
for i in s:
	d[i] += 1
for i in d.values():
	if i > k:
		print('NO')
		break
else:
	print('YES')


(n, k) = map(int, input().split())
s = input()
x = []
y = []
alf = 'abcdefghijklmnopqrstuvwxyz'
m = 0
for i in alf:
	x.append(i)
	q = 0
	for f in s:
		if i == f:
			q = q + 1
	y.append(q)
	if q > m:
		m = q
if m > k:
	print('NO')
else:
	print('YES')


[n, k] = list(map(int, input().split()))
s = input()
h = [0 for i in range(26)]
for i in range(n):
	h[ord(s[i]) - ord('a')] += 1
hmax = 0
for i in range(26):
	hmax = max(hmax, h[i])
if hmax > k:
	print('NO')
	exit(0)
print('YES')


(n, k) = map(int, input().split())
s = input()
a = []
for i in range(n):
	x = s.count(s[i])
	a.append(x)
if max(a) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input().lower()
letters = [0] * 26
b = 0
for i in s:
	nomer = ord(i) - 97
	letters[nomer] += 1
letters.sort(reverse=True)
while 0 in letters:
	letters.pop()
c = letters[:]
if max(c) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
x = list(set(list(s)))
c = [s.count(x[i]) for i in range(len(x))]
if max(c) > k:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, k) = list(map(int, input().split()))
s = list(input())
s_count = Counter(s).most_common()
if len([i[1] for i in s_count if i[1] > k]) == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
k1 = 2
for i in s:
	d[i] = d.get(i, 0) + 1
for i in s:
	if d[i] > k:
		k1 = 1
		break
if k1 == 1:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
(s, d) = (input(), {})
for i in s:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
for (key, value) in d.items():
	if value <= k:
		d[key] = 'YES'
	else:
		d[key] = 'NO'
if 'NO' not in d.values():
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
for el in s:
	if el in d:
		d[el] += 1
	else:
		d[el] = 1
for value in d.values():
	if value > k:
		print('NO')
		return
print('YES')


(n, k) = map(int, input().split())
h = list(input())
g = [(h.count(i), i) for i in set(h)]
print(['YES', 'NO'][max(g)[0] > k])


(n, k) = map(int, input().split(' '))
baloons = list(input())
set_bal = set(baloons)
for ele in set_bal:
	if baloons.count(ele) > k:
		print('NO')
		exit()
print('YES')


(n, k) = [int(x) for x in input().split()]
s = list(input())
p = True
for i in s:
	if s.count(i) > k:
		p = False
		break
if p:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
balloons = input()
balloons = list(balloons)
dic = {}
for x in balloons:
	if x in dic:
		dic[x] += 1
	else:
		dic[x] = 1
if int(max(dic.values())) > k:
	print('NO')
else:
	print('YES')


from collections import Counter
R = lambda : map(int, input().split())
(n, k) = R()
a = input()
count = dict(Counter(a))
for key in count.keys():
	if count[key] > k:
		exit(print('NO'))
print('YES')


(n, k) = map(int, input().split())
s = input()
ans = 0
for i in s:
	ans = max(ans, s.count(i))
if ans <= k:
	print('YES')
else:
	print('NO')


entrada = input().split()
amigos = int(entrada[1])
entrada2 = input()
entrada2 = list(entrada2)
for i in range(0, amigos):
	baloes = []
	for j in range(0, len(entrada2)):
		if entrada2[j] in baloes:
			pass
		else:
			baloes.append(entrada2[j])
	for j in baloes:
		entrada2.remove(j)
if len(entrada2) != 0:
	print('NO')
else:
	print('YES')


import sys, os
(n, k) = map(int, input().split())
ass = input()
data = [0] * 97
for i in range(n):
	data[ord(ass[i]) - 97] += 1
	if data[ord(ass[i]) - 97] > k:
		print('NO')
		exit(0)
		sys.exit
		os.abort()
print('YES')


(n, k) = list(map(int, input().split()))
s = input()
d = {}
kill = 0
for y in s:
	if y in d.keys():
		d[y] += 1
	else:
		d[y] = 1
for y in d.values():
	if y > k:
		kill = 1
		break
if kill == 0:
	print('YES')
else:
	print('NO')


from collections import Counter
(n, k) = [int(i) for i in input().split()]
s = input()
C = Counter(s)
for c in C:
	if C[c] > k:
		print('NO')
		break
else:
	print('YES')


k = int(input().split()[1])
print('YNEOS'[max(map(input().count, map(chr, range(97, 123)))) > k::2])


(n, k) = map(int, input().split())
from sys import stdin, stdout
from collections import Counter
s = stdin.readline().rstrip('\n')
c = Counter(s)
ans = True
for i in c:
	if c[i] > k:
		print('NO')
		ans = False
		break
if ans == True:
	print('YES')


s = input().split()
n = int(s[0])
k = int(s[1])
s = input()
count = [0 for i in range(26)]
for c in s:
	a = ord(c) - ord('a')
	count[a] += 1
for c in count:
	if c > k:
		print('NO')
		break
else:
	print('YES')


import operator
(n, f) = map(int, input().split())
d = {}
for i in input():
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
print('NO' if d[max(d, key=d.get)] > f else 'YES')


a = [int(i) for i in input().split()]
b = input()
c = {}
d = 0
for i in b:
	if c.get(i):
		c[i] = c[i] + 1
		if c[i] > a[1]:
			d = 1
			print('NO')
			break
	else:
		c[i] = 1
if d == 0:
	print('YES')


(a, c) = map(int, input().split())
b = input()
s = {}
m = 0
for i in b:
	s[i] = s.get(i, 0) + 1
	if int(s[i]) > m:
		m = int(s[i])
if m <= c:
	print('YES')
else:
	print('NO')


import string

def main():
	(h, n) = map(int, input().split())
	s = input()
	c = [0] * 26
	for item in s:
		c[string.ascii_lowercase.index(item)] += 1
	for item in c:
		if item > n:
			print('NO')
			return
	print('YES')
main()


(n, k) = map(int, input().split())
s = list(input())
print('YES' if s.count(max(s, key=s.count)) <= k else 'NO')


b = int(input().split()[1])
c = input()
for i in set(c):
	if c.count(i) > b:
		print('NO')
		exit()
print('YES')


from collections import defaultdict

def main():
	counts = input().split(' ')
	letters = input()
	(_, k) = map(int, counts)
	result = task(letters, k)
	print(result)

def task(letters, k):
	letters_dict = defaultdict(int)
	for letter in letters:
		letters_dict[letter] += 1
	if any((True for value in letters_dict.values() if value > k)):
		return 'NO'
	else:
		return 'YES'
main()


A = input().split()
A = [int(i) for i in A]
N = A[0]
K = A[1]
s = input()
s = list(s)
done = False
for i in s:
	copies_of_i = 0
	for j in s:
		if j == i:
			copies_of_i += 1
	if copies_of_i > K:
		if done == False:
			print('NO')
			done = True
if done == False:
	print('YES')


(A, B) = map(int, input().split())
L = list(input())
S = 27 * [0]
for i in range(A):
	S[int(ord(L[i]) - 96)] += 1
if max(S) > B:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
l = input()
if k >= n:
	print('YES')
else:
	for x in l:
		t = l.count(x)
		if t > k:
			print('NO')
			break
	else:
		print('YES')


(n, k) = map(int, input().split())
s = str(input())
count = [0] * 26
for i in s:
	nomer = ord(i) - 97
	count[nomer] += 1
for i in range(26):
	if count[i] > 0:
		m = max(count)
if m > k:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, k) = map(int, input().split())
s = input()
c = Counter(s)
print(('NO', 'YES')[max(c.values()) <= k])


(n, k) = map(int, input().split())
b = input()
d = {}
for c in b:
	if c not in d:
		d[c] = 1
	else:
		d[c] += 1
v = d.values()
if max(v) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
d = {}
stop = 0
for i in s:
	if not i in d:
		d[i] = 1
	else:
		d[i] += 1
		if d[i] > k:
			stop = 1
if stop == 0:
	print('YES')
else:
	print('NO')


import itertools
import collections
(n, k) = list(map(int, input().split()))
words = input()
colors = collections.Counter(list(words))
friends = {}
superbreak = 0
for i in itertools.cycle(list(range(k))):
	if sum(colors.values()) == 0:
		print('YES')
		break
	for (i2, j) in colors.items():
		if j > k:
			superbreak = 1
			break
		if j > 0:
			colors[i2] -= 1
			Get = friends.setdefault(i, [])
			friends[i].append(i2)
			break
		else:
			continue
	if superbreak == 1:
		print('NO')
		break


(a, b) = map(int, input().split())
ans = [''] * b
s = list(input())
c = 0
for i in range(b):
	for j in range(a):
		if s[j] not in ans[i] and s[j] != 'A':
			ans[i] += s[j]
			s[j] = 'A'
			c += 1
if c == a:
	print('YES')
else:
	print('NO')


(n, k) = (int(x) for x in input().split())
st = input().split()[0]
u = [0 for i in range(30)]
s = 0
mx = 0
for i in st:
	u[ord(i) - ord('a')] += 1
for i in u:
	mx = max(i, mx)
	s += i
if mx <= k:
	print('YES')
else:
	print('NO')


from math import *
(n, k) = map(int, input().split())
s = input()
s = sorted(s)
ans = 0
pos = 0
for i in range(n - 1):
	if s[i] != s[i + 1]:
		val = i + 1 - pos
		pos = i + 1
		if ans < val:
			ans = val
if ans < n - pos:
	ans = n - pos
if ans <= k:
	print('YES')
else:
	print('NO')


I = lambda : int(input())
ID = lambda : map(int, input().split())
IL = lambda : list(ID())
(n, k) = ID()
s = list(input())
c = list(set(s))
for i in c:
	if s.count(i) > k:
		print('NO')
		break
else:
	print('YES')


import sys
import math

def ria():
	return [int(i) for i in input().split()]
ar = []
(n, k) = ria()
mp = {}
mx = 0
for i in input():
	if i not in mp:
		mp[i] = 0
	mp[i] += 1
	mx = max(mp[i], mx)
if mx > k:
	print('NO')
else:
	print('YES')


import sys
(n, k) = map(int, input().split())
s = input()
if 0:
	continue
else:
	for i in s:
		if s.count(i) > k:
			print('NO')
			sys.exit()
	print('YES')


(n, k) = map(int, input().split())
s = list(input())
arr = []
already = []
cnt = 0
for i in s:
	if i not in already:
		already.append(i)
		arr.append(s.count(i))
for i in range(k):
	for (index, j) in enumerate(arr):
		if arr[index] > 0:
			arr[index] -= 1
			cnt += 1
if cnt == n and sum(arr) == 0:
	print('YES')
else:
	print('NO')


(n, m) = map(int, input().split())
s = input()
ans = 'YES'
for i in [s.count(k) for k in set(s)]:
	if i > m:
		ans = 'NO'
		break
print(ans)


(ballons, friends) = map(int, input().split())
color = input()
lencolor = len(color)
x = 0
count = [0] * 26
for i in color:
	nomer = ord(i) - 97
	count[nomer] += 1
for i in range(26):
	if count[i] > friends:
		x += 1
if x > 0:
	print('NO')
else:
	print('YES')


(balls, friends) = map(int, input().split())
colors = str(input())
result = 'YES'
database = {}
for i in colors:
	database[i] = database.get(i, 0) + 1
	if database[i] > friends:
		result = 'NO'
		break
print(result)


(n, k) = map(int, input().split())
s = input()
s = list(s)
numbers = []
count = []
for i in range(len(s)):
	numbers.append(ord(s[i]))
for i in numbers:
	count.append(numbers.count(i))
if max(count) > k:
	print('NO')
else:
	print('YES')


(a, b) = map(int, input().split())
c = input()
d = {}
for i in c:
	d[i] = d.get(i, 0) + 1
m = max(d.values())
if m > b:
	print('NO')
else:
	print('YES')


(n, m) = map(int, input().split())
s = input()
a = []
b = []
for i in range(n):
	if s[i] in b:
		a[b.index(s[i])] += 1
	else:
		b.append(s[i])
		a.append(1)
if max(a) > m:
	print('NO')
else:
	print('YES')


from collections import Counter
(n, k) = [int(v) for v in input().split()]
s = input().strip()
cnt = Counter(s)
print(['NO', 'YES'][all([v <= k for v in cnt.values()])])


from collections import Counter
(n, k) = [int(x) for x in input().split()]
s = input()
counter = Counter(s)
mc = counter.most_common()
if mc[0][1] > k:
	print('NO')
else:
	print('YES')


l1 = [int(x) for x in input().split()]
n = l1[1]
l2 = list(input())
done = 0
for x in list(set(l2)):
	if l2.count(x) > n:
		done = 1
		break
if done:
	print('NO')
else:
	print('YES')


def balloons(s, k):
	for i in s:
		x = s.count(i)
		if x > k:
			return 'NO'
	return 'YES'
(n, k) = list(map(int, input().split()))
s = input()
print(balloons(s, k))


(n, k) = map(int, input().split())
list_color = list(input())
d = {}
for i in list_color:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
answer = 'YES'
for i in d:
	if d[i] > k:
		answer = 'NO'
print(answer)


(n, k) = map(int, input().split())
string = input().lower()
l = []
lst = [0] * (ord('z') + 1)
for i in string:
	lst[ord(i)] += 1
for value in range(ord('a'), len(lst)):
	if lst[value] > 0 and lst[value] > k:
		l.append('NO')
	elif lst[value] > 0 and lst[value] <= k:
		l.append('YES')
if 'NO' in l:
	print('NO')
else:
	print('YES')


(x, y) = map(int, input().split())
p = input()
m = 0
for i in p:
	if p.count(i) > y:
		m = 1
print('NO' if m == 1 else 'YES')


arr = input().split()
n = int(arr[0])
k = int(arr[1])
line = input()
mass = []
for i in range(len(line)):
	mass += line[i]
for i in range(len(mass)):
	mass[i] = ord(mass[i])
mass.sort()
same = 1
c = 1
if len(mass) == 1:
	print('yes')
else:
	for i in range(len(mass) - 1):
		if mass[i] == mass[i + 1]:
			c += 1
		if c > same:
			same = c
		if mass[i] != mass[i + 1]:
			c = 1
	if same > k:
		print('no')
	else:
		print('yes')


(n, k) = map(int, input().split())
s = input()
s = [s.count(s[i]) for i in range(n) if s[i] not in s[:i]]
c = 0
for i in s:
	if i > k:
		c += 1
if c == 0:
	print('YES')
else:
	print('NO')


string = input().split(' ')
n = int(string[0])
k = int(string[1])
string = list(input())
uniqueString = set(string)
toPrint = 'YES'
for char in uniqueString:
	if string.count(char) > k:
		toPrint = 'NO'
print(toPrint)


(n, k) = map(int, input().split())
s = input()
has = [0] * 27
for i in s:
	has[ord(i) - ord('a')] += 1
if max(has) <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = input()
f = True
for c in range(ord('a'), ord('z') + 1):
	if s.count(chr(c)) > k:
		f = False
if f == True:
	print('YES')
else:
	print('NO')


from collections import Counter
print(('YES', 'NO')[int(input().split()[1]) < Counter(input()).most_common(1)[0][1]])


from collections import Counter

def lol(c):
	for x in s:
		if c[x] > m:
			return 0
	return 1
(n, m) = map(int, input().split())
s = input()
c = Counter(s)
print('YES' if lol(c) else 'NO')


(n, k) = map(int, input().split())
s = list(input())
colors = set(s)
result = 'YES'
if result == 'YES':
	for color in colors:
		if s.count(color) > k:
			result = 'NO'
			break
print(result)


(a, b) = map(int, input().split())
elem = list(input())
m = 0
for i in set(elem):
	m = max(m, elem.count(i))
if m > b:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
cnt = {}
for c in input():
	if c in cnt:
		cnt[c] += 1
	else:
		cnt[c] = 1
ans = 'YES'
for x in cnt.values():
	if x > k:
		ans = 'NO'
print(ans)


from collections import defaultdict
(n, k) = map(int, input().split())
baloons = defaultdict(int)
for color in input():
	baloons[color] += 1
for key in baloons:
	if baloons[key] > k:
		print('NO')
		exit()
print('YES')


(n, k) = map(int, input().split())
s = input()
b = ''
c = []
maxBalls = 0
good = True
if n > k:
	for i in range(n):
		if not s[i] in b:
			b += s[i]
	for i in b:
		if maxBalls < s.count(i):
			maxBalls = s.count(i)
	if maxBalls >= k:
		if maxBalls != k:
			good = False
if good:
	print('YES')
else:
	print('NO')


mn = input().split()
n = int(mn[1])
s = str(input())
k = 0
for i in s:
	if s.count(i) > n:
		k = 2
		break
if k == 0:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
a = list(input())
b = list(set(a))
for i in range(len(b)):
	if a.count(b[i]) > k:
		print('NO')
		exit()
print('YES')


kn = input().split()
color = input()
cd = dict()
for c in color:
	cd[c] = cd.get(c, 0) + 1
lst = list()
for (key, value) in cd.items():
	lst.append((value, key))
lst.sort(reverse=True)
for (key, value) in lst[:1]:
	print('YES' if key <= int(kn[1]) else 'NO')


n = int(input().split()[1])
a = input()
print(['YES', 'NO'][a.count(max(set(a), key=a.count)) > n])


from collections import Counter
(nosOfBaloon, nosOfFriends) = [int(x) for x in input().strip().split()]
allColors = Counter([x for x in input().strip()])
canBe = True
for k in allColors:
	if allColors[k] > nosOfFriends:
		canBe = False
		break
print('YES' if canBe else 'NO')


def main():
	[__, n_friends] = [int(_) for _ in input().split()]
	colors = input()
	count = {}
	no = False
	for c in colors:
		count_c = count.get(c, 0) + 1
		if count_c > n_friends:
			no = True
			break
		else:
			count[c] = count_c
	print('NO' if no else 'YES')
main()


(n, k) = [int(w) for w in input().split()]
s = input()
s1 = set([w for w in s])
d = {a: s.count(a) for a in s1}
m = max(d.values())
if m <= k:
	print('YES')
else:
	print('NO')


(n, k) = list(map(int, input().split()))
number = str(input())
flag = 0
for i in number:
	if number.count(i) > k:
		flag = 1
		print('NO')
		break
if flag == 0:
	print('YES')


(n, k) = map(int, input().split())
ss = input()
flag = 0
for i in ss:
	if ss.count(i) > k:
		flag = 1
if flag:
	print('NO')
else:
	print('YES')


import math
import sys
input = sys.stdin.readline

def invr():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])
(n, k) = invr()
s = insr()
d = {}
for i in s:
	if d.get(i) == None:
		d[i] = 1
	else:
		d[i] += 1
	if d[i] > k:
		print('NO')
		sys.exit(0)
print('YES')


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(N, K) = map(int, input().split())
S = input()
C = collections.Counter(S)
if max(C.values()) > K:
	print('NO')
else:
	print('YES')


def res(list, num):
	for i in list.values():
		if i > num:
			return 'NO'
	return 'YES'
(n, k) = map(int, input().split())
s = input()
colors = dict()
for let in s:
	if colors.get(let, 0) == 0:
		colors[let] = colors.get(let, 0)
	colors[let] += 1
print(res(colors, k))


(n, k) = tuple(map(int, input().split(' ')))
if n <= k:
	print('YES')
else:
	string = input()
	assert len(string) == n
	count = [0 for i in range(26)]
	result = True
	a = ord('a')
	for c in string:
		index = ord(c) - a
		count[index] += 1
		if count[index] > k:
			result = False
			break
	print('YES' if result else 'NO')


l = list(map(int, input().split()))
n = l[0]
k = l[1]
m = input(str())
m = sorted(m)
maxx = 0
index = m[0]
Flag = 0
for i in m:
	if i == index:
		Flag += 1
	else:
		if Flag > maxx:
			maxx = Flag
		Flag = 0
		index = i
		if i == index:
			Flag += 1
if Flag > maxx:
	maxx = Flag
if maxx > k:
	print('NO')
else:
	print('YES')


(n, k) = map(int, input().split())
dict_chars = {}
for c in input():
	if c not in dict_chars:
		dict_chars[c] = 0
	dict_chars[c] += 1
	if dict_chars[c] / k > 1:
		print('NO')
		quit()
print('YES')


(a, b) = map(int, input().split())
s = input()
flag = 1
op = 0
x = set(s)
q = [[] for x in range(b)]
for i in range(a):
	flag = 1
	for j in range(b):
		if s[i] not in q[j]:
			q[j].append(s[i])
			flag = 0
			break
	if flag == 1:
		op = 1
		print('NO')
		break
if op == 0:
	print('YES')


from collections import Counter
(n, k) = map(int, input().split())
c = Counter(input())
maxv = 0
for x in c:
	maxv = max(c[x], maxv)
if maxv <= k:
	print('YES')
else:
	print('NO')


a = input().split(' ')
b = input()
s = {}
for i in b:
	if i in s:
		s[i] += 1
	else:
		s[i] = 1
ss = 0
for i in s:
	if s[i] > int(a[1]):
		ss = 1
		print('NO')
		break
if ss == 0:
	print('YES')


(n, k) = tuple(map(int, input().split()))
s = input()
d = {x: s.count(x) for x in s}
for i in d.values():
	if i > k:
		print('NO')
		exit()
print('YES')


from collections import defaultdict
s = input().split()
(n, k) = (int(s[0]), int(s[1]))
s = input()
d = defaultdict(int)
success = True
for i in range(n):
	d[s[i]] += 1
	if d[s[i]] > k:
		success = False
		break
print('YES' if success else 'NO')


(n, k) = map(int, input().split())
s = list(map(str, input()))
m = []
for i in range(len(s)):
	m.append(s.count(s[i]))
for i in range(len(s)):
	if m[i] > k:
		print('NO')
		exit(0)
print('YES')


line_1 = input().split()
n = int(line_1[0])
k = int(line_1[1])
s = input()
colour_dict = {}
for balloon in s:
	if balloon in colour_dict.keys():
		colour_dict[balloon] += 1
	else:
		colour_dict[balloon] = 1
if k >= max(colour_dict.values()):
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = sorted(input())
arr = list()
count = 1
for i in range(n - 1):
	if s[i] == s[i + 1]:
		count += 1
	else:
		arr.append(count)
		count = 1
arr.append(count)
print('YES' if max(arr) <= k else 'NO')


y = input().split(' ')
a = int(y[0])
b = int(y[1])
str = input()
for i in range(0, a):
	soma = 0
	x = str[i]
	for j in range(0, a):
		if x == str[j]:
			soma = soma + 1
	if soma > b:
		break
if soma > b:
	print('NO')
else:
	print('YES')


(n, k) = [int(i) for i in input().split()]
a = []
for i in range(26):
	a.append(0)
s = input()
for i in s:
	a[ord(i) - 97] += 1
m = a[0]
for i in a:
	if i > m:
		m = i
if m <= k:
	print('YES')
else:
	print('NO')


(n, k) = map(int, input().split())
s = list(input())
res = None
string = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in string:
	if s.count(i) > k:
		res = 'No'
if n == k:
	res = 'Yes'
if res == 'No':
	print('No')
else:
	print('Yes')


from collections import Counter
(n, k) = map(int, input().split())
s = input()
s = list(s)
cnt = Counter(s)
r = 0
for i in cnt:
	if cnt[i] > k:
		r = 1
		break
print('YES' if r == 0 else 'NO')


(n, k) = map(int, input().split())
s = input()
Flag = False
a = list(range(123))
for i in range(123):
	a[i] = 0
for i in range(len(s)):
	a[ord(s[i])] += 1
	if a[ord(s[i])] > k:
		Flag = True
if Flag == True:
	print('NO')
	exit()
print('YES')


(n, m) = map(int, input().split())
list = input()
k = int(1)
for i in list:
	if list.count(i) > m:
		k = 0
print('NO' if k == 0 else 'YES')


(n, k) = map(int, input().split())
s = input()
slovar = dict.fromkeys(s, 0)
for i in list(s):
	slovar[i] += 1
if max(slovar.values()) > k:
	print('NO')
else:
	print('YES')


(balls, friends) = map(int, input().split())
status = [0] * 26
string = str(input())
for i in range(len(string)):
	number = ord(string[i]) - 97
	status[number] += 1
	if status[number] > friends:
		print('NO')
		break
	if i == len(string) - 1:
		print('YES')


(b, a) = map(int, input().split())
s = input()
d = {}
for i in s:
	d[i] = 0
for i in s:
	d[i] += 1
ar = [0 for i in range(26)]
m = 0
for i in d.values():
	m = max(m, i)
if m / a > 1:
	print('NO')
else:
	print('YES')


k = 0
n = 0
s = ''
temp = input()
temp = temp.split()
n = int(temp[0])
k = int(temp[1])
s = input()
s = ''.join(sorted(s))
colors = set(s)
no = False
for c in colors:
	if s.count(c) > k:
		no = True
if no:
	print('NO')
else:
	print('YES')


(n, k) = [int(x) for x in input().split()]
a = input()
b = list(a)
c = set(b)
d = []
for i in c:
	d.append(b.count(i))
if max(d) <= k:
	print('YES')
else:
	print('NO')