fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main() {
    val (h, w) = intList()
    val counter = hashMapOf<Char, Int>()
    repeat(h) {
        val a = readLine() ?: return
        a.forEach { c ->
            counter[c] = counter.getOrDefault(c, 0) + 1
        }
    }
    val one = when {
        h == 1 -> {
            w
        }
        w == 1 -> {
            h
        }
        else -> {
            0
        }
    }
    if (one > 0) {
        val ok = if (one % 2 == 1) {
            counter.values.count { it % 2 == 1 } == 1
        } else {
            counter.values.count { it % 2 == 1 } == 0
        }
        println(if (ok) "Yes" else "No")
        return
    }

    var g1 = 0
    var g2 = 0
    var g4 = 0
    if (h % 2 == 1 && w % 2 == 1) {
        g1 = 1
        g2 = h / 2 + w / 2
        g4 = (h / 2) * (w / 2)
    } else if (h % 2 == 0 && w % 2 == 0) {
        g4 = (h * w) / 4
    } else {
        g2 = if (h % 2 == 0) {
            h / 2
        } else {
            w / 2
        }
        g4 = (h / 2) * (w / 2)
    }
    repeat(g1) {
        counter.entries.find { (it.value - 3) % 4 == 0 || (it.value - 1) % 4 == 0 }?.let {
            counter[it.key] = counter.getOrDefault(it.key, 0) - 1
        }
    }
    repeat(g2) {
        counter.entries.find { (it.value - 2) % 4 == 0 }?.let {
            counter[it.key] = counter.getOrDefault(it.key, 0) - 2
        }
    }
    repeat(g4) {
        counter.entries.find { it.value > 0 && it.value % 4 == 0 }?.let {
            counter[it.key] = counter.getOrDefault(it.key, 0) - 4
        }
    }
    if (counter.values.all { it == 0 }) {
        println("Yes")
    } else {
        println("No")
    }
}
