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

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

a=b=c=0

if h%2and w%2:

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

    c=1

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

elif h%2or w%2:

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

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

else:

    a=h*w//4

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

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 = b = c = 0
if h % 2 and w % 2:
    a = h // 2 * (w // 2)
    c = 1
    b = (h * w - a * 4 - c) // 2
elif h % 2 or w % 2:
    a = h // 2 * (w // 2)
    b = (h * w - a * 4) // 2
else:
    a = h * w // 4
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
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")

-a = b = c = 0 -if h % 2 and w % 2: -    a = h // 2 * (w // 2) -    c = 1 -    b = (h * w - a * 4 - c) // 2 -elif h % 2 or w % 2: -    a = h // 2 * (w // 2) -    b = (h * w - a * 4) // 2 -else: -    a = h * w // 4 +a = h // 2 * (w // 2) +c = h % 2 and w % 2 +b = (h * w - a * 4 - c) // 2