from collections import Counter

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

cntA = Counter()

for _ in range(H):

    cntA += Counter(list(eval(input())))



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

    if all(c % 4 == 0 for c in list(cntA.values())):

        print('Yes')

    else:

        print('No')

    exit()



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

    two = (H if H % 2 == 0 else W) // 2

    cntTwo = 0

    for c in list(cntA.values()):

        if c % 4 == 0:

            continue

        if c % 2 == 0:

            cntTwo += 1

            continue

        break

    else:

        if cntTwo <= two:

            print('Yes')

            exit()

    print('No')

    exit()



cntTwo = 0

cntOdd = 0

for c in list(cntA.values()):

    if c % 4 == 0:

        continue

    if c % 2 == 0:

        cntTwo += 1

        continue

    cntOdd += 1



if cntOdd == 1 and cntTwo <= (H + W - 2) // 2:

    print('Yes')

    exit()



print('No')
from collections import Counter

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

cntA = Counter()



for _ in range(H):

    cntA += Counter(list(eval(input())))



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

for a, c in list(cntA.items()):

    if four <= 0:

        break

    while c >= 4 and four > 0:

        c -= 4

        four -= 1

    cntA[a] = c



if four > 0:

    print('No')

    exit()



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

    for a, c in list(cntA.items()):

        if c % 2 == 1:

            cntA[a] -= 1

            break

    else:

        print('No')

        exit()



print(('Yes' if all(c % 2 == 0 for c in list(cntA.values())) else 'No'))

from collections import Counter

H, W = list(map(int, input().split()))
cntA = Counter()
for _ in range(H):
    cntA += Counter(list(eval(input())))
if H % 2 + W % 2 == 0:
    if all(c % 4 == 0 for c in list(cntA.values())):
        print("Yes")
    else:
        print("No")
    exit()
if H % 2 + W % 2 == 1:
    two = (H if H % 2 == 0 else W) // 2
    cntTwo = 0
    for c in list(cntA.values()):
        if c % 4 == 0:
            continue
        if c % 2 == 0:
            cntTwo += 1
            continue
        break
    else:
        if cntTwo <= two:
            print("Yes")
            exit()
    print("No")
    exit()
cntTwo = 0
cntOdd = 0
for c in list(cntA.values()):
    if c % 4 == 0:
        continue
    if c % 2 == 0:
        cntTwo += 1
        continue
    cntOdd += 1
if cntOdd == 1 and cntTwo <= (H + W - 2) // 2:
    print("Yes")
    exit()
print("No")

from collections import Counter

H, W = list(map(int, input().split()))
cntA = Counter()
for _ in range(H):
    cntA += Counter(list(eval(input())))
four = (H // 2) * (W // 2)
for a, c in list(cntA.items()):
    if four <= 0:
        break
    while c >= 4 and four > 0:
        c -= 4
        four -= 1
    cntA[a] = c
if four > 0:
    print("No")
    exit()
if H % 2 == W % 2 == 1:
    for a, c in list(cntA.items()):
        if c % 2 == 1:
            cntA[a] -= 1
            break
    else:
        print("No")
        exit()
print(("Yes" if all(c % 2 == 0 for c in list(cntA.values())) else "No"))

-if H % 2 + W % 2 == 0: -    if all(c % 4 == 0 for c in list(cntA.values())): -        print("Yes") +four = (H // 2) * (W // 2) +for a, c in list(cntA.items()): +    if four <= 0: +        break +    while c >= 4 and four > 0: +        c -= 4 +        four -= 1 +    cntA[a] = c +if four > 0: +    print("No") +    exit() +if H % 2 == W % 2 == 1: +    for a, c in list(cntA.items()): +        if c % 2 == 1: +            cntA[a] -= 1 +            break -    exit() -if H % 2 + W % 2 == 1: -    two = (H if H % 2 == 0 else W) // 2 -    cntTwo = 0 -    for c in list(cntA.values()): -        if c % 4 == 0: -            continue -        if c % 2 == 0: -            cntTwo += 1 -            continue -        break -    else: -        if cntTwo <= two: -            print("Yes") -            exit() -    print("No") -    exit() -cntTwo = 0 -cntOdd = 0 -for c in list(cntA.values()): -    if c % 4 == 0: -        continue -    if c % 2 == 0: -        cntTwo += 1 -        continue -    cntOdd += 1 -if cntOdd == 1 and cntTwo <= (H + W - 2) // 2: -    print("Yes") -    exit() -print("No") +        exit() +print(("Yes" if all(c % 2 == 0 for c in list(cntA.values())) else "No"))