import java.util.*

fun main(args: Array<String>) {
    val (H, W) = readLine()!!.split(" ").map{it.toInt()}
    val f = Array<String>(H) { readLine()!! }
    val mp = TreeMap<Char, Int>()

    for (row in f) {
        for (c in row) {
            mp[c] = (mp[c] ?: 0) + 1
        }
    }

    val h: Int
    val w: Int

    if (H % 2 != 0) {
        h = W
        w = H
    } else {
        h = H
        w = W
    }

    val c2: Int
    val c1: Int

    if (h % 2 != 0) {
        c1 = 1
        c2 = h + w - 2
    } else if (w % 2 != 0) {
        c1 = 0
        c2 = h
    } else {
        c1 = 0
        c2 = 0
    }
    val c4 = h * w - (c1 + c2)

    if (c2 % 2 != 0 || c4 % 4 != 0) {
        System.exit(1)
    }

    val b = arrayOf(c1, c2, c4)

    for (i in 2 downTo 0) {
        val k = 1 shl i
        for(v in mp.keys) {
            val a = Math.min(b[i], mp[v]!! / k * k)
            b[i] -= a
            mp[v] = mp[v]!! - a
        }

        if (b[i] > 0) {
            println("No")
            return
        }
    }

    println("Yes")
}
