# code-festival-2017-qualaC - Palindromic Matrix

from collections import defaultdict





def main():

    H, W, *A = open(0).read().split()

    H, W, C = int(H), int(W), defaultdict(int)

    for i in "".join(A):

        C[i] += 1

    single = H & W & 1

    double = (H >> 1 if W & 1 else 0) + (W >> 1 if H & 1 else 0)

    C_mod4 = [i % 4 for i in list(C.values())]

    flg = C_mod4.count(1) + C_mod4.count(3) <= single and C_mod4.count(2) <= double

    print(("Yes" if flg else "No"))





if __name__ == "__main__":

    main()
# code-festival-2017-qualaC - Palindromic Matrix

def main():

    H, W, *A = open(0).read().split()

    H, W, C = int(H), int(W), {}

    for i in "".join(A):

        if i not in C:

            C[i] = 0

        C[i] += 1

    single = H & W & 1

    double = (H >> 1 if W & 1 else 0) + (W >> 1 if H & 1 else 0)

    C_mod4 = [i % 4 for i in list(C.values())]

    flg = C_mod4.count(1) + C_mod4.count(3) <= single and C_mod4.count(2) <= double

    print(("Yes" if flg else "No"))





if __name__ == "__main__":

    main()
# code-festival-2017-qualaC - Palindromic Matrix
from collections import defaultdict


def main():
    H, W, *A = open(0).read().split()
    H, W, C = int(H), int(W), defaultdict(int)
    for i in "".join(A):
        C[i] += 1
    single = H & W & 1
    double = (H >> 1 if W & 1 else 0) + (W >> 1 if H & 1 else 0)
    C_mod4 = [i % 4 for i in list(C.values())]
    flg = C_mod4.count(1) + C_mod4.count(3) <= single and C_mod4.count(2) <= double
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()

# code-festival-2017-qualaC - Palindromic Matrix
def main():
    H, W, *A = open(0).read().split()
    H, W, C = int(H), int(W), {}
    for i in "".join(A):
        if i not in C:
            C[i] = 0
        C[i] += 1
    single = H & W & 1
    double = (H >> 1 if W & 1 else 0) + (W >> 1 if H & 1 else 0)
    C_mod4 = [i % 4 for i in list(C.values())]
    flg = C_mod4.count(1) + C_mod4.count(3) <= single and C_mod4.count(2) <= double
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()

-from collections import defaultdict - - -    H, W, C = int(H), int(W), defaultdict(int) +    H, W, C = int(H), int(W), {} +        if i not in C: +            C[i] = 0