fun main(arr: Array<String>) {
    println(if(getAns()) "Yes" else "No")
}

fun getAns():Boolean {
    val (h,w) = readLine()!!.split(" ").map { it.toInt() }
    val map = (1..h).map { readLine()!! }
    val cnt = mutableMapOf<Char, Int>()
    map.forEach { line -> line.forEach { cnt[it] = (cnt[it]?:0)+1 } }
    if(h%2==0) {
        if(w%2==0) {
            return cnt.values.all { it%4==0 }
        } else {
            if(cnt.values.any{it%2!=0}) {
                return false
            }
            return cnt.values.filter { it%4!=0 && it%2==0 }.count()*2 <= h
        }
    } else {
        if(w%2==0) {
            if(cnt.values.any{it%2!=0}) {
                return false
            }
            return cnt.values.filter { it%4!=0 && it%2==0 }.count()*2 <= w
        } else {
            if(cnt.values.count { it%2!=0 } != 1) {
                return false
            }
            return cnt.values.filter { it%4!=0&&it%2==0 }.count()*2 <= w+h-2
        }
    }
}
