t,_,s=open(0).read().partition('\n')

h,w=list(map(int,t.split()))

a=h//2*(w//2)

c=h%2and w%2

b=(h*w-a*4-c)//2

l=[]

for i in set(s.replace('\n','')):

    l.append(s.count(i))

for i in l:

    if i>3:

        while i>3and a:

            i-=4

            a-=1

    if i>1:

        while i>1and b:

            i-=2

            b-=1

    if i and c:

        i-=1

        c-=1

if all(not t for t in(a,b,c)):

    print('Yes')

else:

    print('No')
t,_,s=open(0).read().partition('\n')

h,w=list(map(int,t.split()))

a=h//2*(w//2)

c=h%2and w%2

b=(h*w-a*4-c)//2

for i in set(s.replace('\n','')):

  i=s.count(i)

  while i>3and a:

    i-=4

    a-=1

  while i>1and b:

    i-=2

    b-=1

  if i and c:

    i-=1

    c-=1

print(('YNeos'[any(t for t in(a,b,c))::2]))
t, _, s = open(0).read().partition("\n")
h, w = list(map(int, t.split()))
a = h // 2 * (w // 2)
c = h % 2 and w % 2
b = (h * w - a * 4 - c) // 2
l = []
for i in set(s.replace("\n", "")):
    l.append(s.count(i))
for i in l:
    if i > 3:
        while i > 3 and a:
            i -= 4
            a -= 1
    if i > 1:
        while i > 1 and b:
            i -= 2
            b -= 1
    if i and c:
        i -= 1
        c -= 1
if all(not t for t in (a, b, c)):
    print("Yes")
else:
    print("No")

t, _, s = open(0).read().partition("\n")
h, w = list(map(int, t.split()))
a = h // 2 * (w // 2)
c = h % 2 and w % 2
b = (h * w - a * 4 - c) // 2
for i in set(s.replace("\n", "")):
    i = s.count(i)
    while i > 3 and a:
        i -= 4
        a -= 1
    while i > 1 and b:
        i -= 2
        b -= 1
    if i and c:
        i -= 1
        c -= 1
print(("YNeos"[any(t for t in (a, b, c)) :: 2]))

-l = [] -    l.append(s.count(i)) -for i in l: -    if i > 3: -        while i > 3 and a: -            i -= 4 -            a -= 1 -    if i > 1: -        while i > 1 and b: -            i -= 2 -            b -= 1 +    i = s.count(i) +    while i > 3 and a: +        i -= 4 +        a -= 1 +    while i > 1 and b: +        i -= 2 +        b -= 1 -if all(not t for t in (a, b, c)): -    print("Yes") -else: -    print("No") +print(("YNeos"[any(t for t in (a, b, c)) :: 2]))