H,W = list(map(int,input().split()))

C = {}

for _ in range(H):

    A = input().strip()

    for i in range(W):

        if A[i] not in C:

            C[A[i]] = 0

        C[A[i]] += 1

cnt4 = 0

cnt1 = 0

for a in C:

    if C[a]>=4:

        cnt4 += C[a]//4

        C[a] = C[a]%4

    if C[a]%2==1:

        cnt1 += 1

if cnt4<(W//2)*(H//2):

    flag = 0

else:

    if H%2==1 and W%2==1:

        if cnt1==1:

            flag = 1

        else:

            flag = 0

    else:

        if cnt1==0:

            flag = 1

        else:

            flag = 0

if flag==1:

    print("Yes")

else:

    print("No")
H,W = list(map(int,input().split()))

A = [input().strip() for _ in range(H)]

C = {chr(i):0 for i in range(97,123)}

for i in range(H):

    for j in range(W):

        C[A[i][j]] += 1

if H%2==0 and W%2==0:

    flag = 0

    for a in C:

        if C[a]%4!=0:

            flag = 1

            break

    if flag==0:

        print("Yes")

    else:

        print("No")

elif (H%2==0 and W%2==1) or (H%2==1 and W%2==0):

    n = (H//2)*(W//2)

    for a in C:

        if C[a]>=4:

            n -= C[a]//4

            C[a] = C[a]%4

    if n>0:

        print("No")

    else:

        flag = 0

        for a in C:

            if C[a]%2==1:

                flag=1

                break

        if flag==0:

            print("Yes")

        else:

            print("No")

else:

    n = (H//2)*(W//2)

    for a in C:

        if C[a]>=4:

            n -= C[a]//4

            C[a] = C[a]%4

    if n>0:

        print("No")

    else:

        cnt = 0

        for a in C:

            cnt += C[a]%2

        if cnt==1:

            print("Yes")

        else:

            print("No")
H, W = list(map(int, input().split()))
C = {}
for _ in range(H):
    A = input().strip()
    for i in range(W):
        if A[i] not in C:
            C[A[i]] = 0
        C[A[i]] += 1
cnt4 = 0
cnt1 = 0
for a in C:
    if C[a] >= 4:
        cnt4 += C[a] // 4
        C[a] = C[a] % 4
    if C[a] % 2 == 1:
        cnt1 += 1
if cnt4 < (W // 2) * (H // 2):
    flag = 0
else:
    if H % 2 == 1 and W % 2 == 1:
        if cnt1 == 1:
            flag = 1
        else:
            flag = 0
    else:
        if cnt1 == 0:
            flag = 1
        else:
            flag = 0
if flag == 1:
    print("Yes")
else:
    print("No")

H, W = list(map(int, input().split()))
A = [input().strip() for _ in range(H)]
C = {chr(i): 0 for i in range(97, 123)}
for i in range(H):
    for j in range(W):
        C[A[i][j]] += 1
if H % 2 == 0 and W % 2 == 0:
    flag = 0
    for a in C:
        if C[a] % 4 != 0:
            flag = 1
            break
    if flag == 0:
        print("Yes")
    else:
        print("No")
elif (H % 2 == 0 and W % 2 == 1) or (H % 2 == 1 and W % 2 == 0):
    n = (H // 2) * (W // 2)
    for a in C:
        if C[a] >= 4:
            n -= C[a] // 4
            C[a] = C[a] % 4
    if n > 0:
        print("No")
    else:
        flag = 0
        for a in C:
            if C[a] % 2 == 1:
                flag = 1
                break
        if flag == 0:
            print("Yes")
        else:
            print("No")
else:
    n = (H // 2) * (W // 2)
    for a in C:
        if C[a] >= 4:
            n -= C[a] // 4
            C[a] = C[a] % 4
    if n > 0:
        print("No")
    else:
        cnt = 0
        for a in C:
            cnt += C[a] % 2
        if cnt == 1:
            print("Yes")
        else:
            print("No")

-C = {} -for _ in range(H): -    A = input().strip() -    for i in range(W): -        if A[i] not in C: -            C[A[i]] = 0 -        C[A[i]] += 1 -cnt4 = 0 -cnt1 = 0 -for a in C: -    if C[a] >= 4: -        cnt4 += C[a] // 4 -        C[a] = C[a] % 4 -    if C[a] % 2 == 1: -        cnt1 += 1 -if cnt4 < (W // 2) * (H // 2): +A = [input().strip() for _ in range(H)] +C = {chr(i): 0 for i in range(97, 123)} +for i in range(H): +    for j in range(W): +        C[A[i][j]] += 1 +if H % 2 == 0 and W % 2 == 0: +    for a in C: +        if C[a] % 4 != 0: +            flag = 1 +            break +    if flag == 0: +        print("Yes") +    else: +        print("No") +elif (H % 2 == 0 and W % 2 == 1) or (H % 2 == 1 and W % 2 == 0): +    n = (H // 2) * (W // 2) +    for a in C: +        if C[a] >= 4: +            n -= C[a] // 4 +            C[a] = C[a] % 4 +    if n > 0: +        print("No") +    else: +        flag = 0 +        for a in C: +            if C[a] % 2 == 1: +                flag = 1 +                break +        if flag == 0: +            print("Yes") +        else: +            print("No") -    if H % 2 == 1 and W % 2 == 1: -        if cnt1 == 1: -            flag = 1 +    n = (H // 2) * (W // 2) +    for a in C: +        if C[a] >= 4: +            n -= C[a] // 4 +            C[a] = C[a] % 4 +    if n > 0: +        print("No") +    else: +        cnt = 0 +        for a in C: +            cnt += C[a] % 2 +        if cnt == 1: +            print("Yes") -            flag = 0 -    else: -        if cnt1 == 0: -            flag = 1 -        else: -            flag = 0 -if flag == 1: -    print("Yes") -else: -    print("No") +            print("No")