local h,w=io.read("n","n","l")
local map={}
for i=1,h do
    local s=io.read()
    for j=1,w do
        local a=s:sub(j,j)
        map[a]=((map[a] or 0)+1)
        map[a]=map[a]%4
    end
end

local g1=(h%2)*(w%2)
local g2=(h%2)*(w//2)+(w%2)*(h//2)
local g4=(h*w-2*g2-g1)//4

for i=1,g1 do
    for k,v in pairs(map) do
        if v==1 or v==3 then
            g1=g1-1
            break
        end
    end
end

for i=1,g2 do
    for k,v in pairs(map) do
        if v==2 then
            g2=g2-1
            break
        end
    end
end

for i=1,g4 do
    for k,v in pairs(map) do
        if v==0 then
            g4=g4-1
            break
        end
    end
end

local checker=(g1==0 and g2==0 and g4==0)
print(checker and "Yes" or "No")