We have an H-by-W matrix. Let a_{ij} be the element at the i-th row from the top and j-th column from the left. In this matrix, each a_{ij} is a lowercase English letter.  Snuke is creating another H-by-W matrix, A', by freely rearranging the elements in A. Here, he wants to satisfy the following condition:    * Every row and column in A' can be read as a palindrome.  Determine whether he can create a matrix satisfying the condition.
# -*- coding: utf-8 -*-
from collections import Counter
h,w = map(int, input().split())
al = []
for _ in range(h):
    al += list(input())

c = Counter(al)

if h==1 or w==1:
    res = "YES"
    one = []
    for k in c.keys():
        if c[k]%2==0:
            pass
        elif c[k]%2==1:
            one.append(k)
        else:
            res = "NO"
            break
    if res=="YES" and len(one)!=1:
        res = "NO"
elif h%2==0 and w%2==0:
    res = "YES"
    for k in c.keys():
        if c[k]%4!=0:
            res = "NO"
            break
elif h%2==1 and w%2==1:
    res = "YES"
    one = []
    for k in c.keys():
        if c[k]%4==0:
            pass
        elif c[k]%4==1:
            one.append(k)
        else:
            res = "NO"
            break
    if res=="YES" and len(one)!=1:
        res = "NO"
else:
    res = "YES"
    for k in c.keys():
        if c[k]%2!=0:
            res = "NO"
            break

print(res)

# -*- coding: utf-8 -*-
from collections import Counter
h,w = map(int, input().split())
al = []
for _ in range(h):
    al += list(input())

c = Counter(al)

if h%2==1 and w%2==1:
    for k in c.keys():
        if c[k]%2==1:
            c[k] -= 1
            break

g4 = (h//2)*(w//2)*4
for k in c.keys():
    while c[k]>=4 and g4>0:
        c[k] -= 4
        g4 -= 4
if g4>0:
    print("No")
    exit()

g2 = (h%2)*(w//2)*2 + (w%2)*(h//2)*2
for k in c.keys():
    while c[k]>=2 and g2>0:
        c[k] -= 2
        g2 -= 2
if g2>0:
    print("No")
    exit()

for k in c.keys():
    if c[k]>0:
        print("No")
        exit()
print("Yes")
