# code-festival-2017-qualaC - Palindromic Matrix

from collections import Counter





def main():

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

    H, W, C = int(H), int(W), list(Counter("".join(A)).values())

    single = H & W & 1

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

    C_mod4, C_div4 = list(zip(*[(i % 4, i // 4) for i in C]))

    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 Counter





def main():

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

    H, W, C = int(H), int(W), list(Counter("".join(A)).values())

    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 C]

    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 Counter


def main():
    H, W, *A = open(0).read().split()
    H, W, C = int(H), int(W), list(Counter("".join(A)).values())
    single = H & W & 1
    double = (H >> 1 if W & 1 else 0) + (W >> 1 if H & 1 else 0)
    C_mod4, C_div4 = list(zip(*[(i % 4, i // 4) for i in C]))
    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 Counter


def main():
    H, W, *A = open(0).read().split()
    H, W, C = int(H), int(W), list(Counter("".join(A)).values())
    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 C]
    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()

-    C_mod4, C_div4 = list(zip(*[(i % 4, i // 4) for i in C])) +    C_mod4 = [i % 4 for i in C]