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
    end
end

local count={}
for k,v in pairs(map) do
    count[v]=(count[v] or 0)+1
end

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

while g1>0 do
    local checker=false
    for i=1,10000 do
        if i%4==1 or i%4==3 then
            if count[i] and count[i]>0 then
                count[i]=count[i]-1
                count[i-1]=(count[i-1] or 0)+1
                checker=true
                g1=g1-1
            end
        end
    end
    if not checker then
        print("No")
        return
    end
end

while g4>0 do
    local checker=false
    for i=1,10000 do
        if i%2==0 then
            if count[i] and count[i]>0 then
                count[i]=count[i]-1
                count[i-4]=(count[i-4] or 0)+1
                checker=true
                g4=g4-1
            end
        end
    end
    if not checker then
        print("No")
        return
    end
end

while g2>0 do
    local checker=false
    for i=1,10000 do
        if i%2==0 then
            if count[i] and count[i]>0 then
                count[i]=count[i]-1
                count[i-2]=(count[i-2] or 0)+1
                checker=true
                g2=g2-1
            end
        end
    end
    if not checker then
        print("No")
        return
    end
end

print("Yes")