local h, w = io.read("*n", "*n", "*l")
local words = {}
for i = 1, h do
  local str = io.read()
  for j = 1, w do
    local sstr = str:sub(j, j)
    if not words[sstr] then words[sstr] = 1 else words[sstr] = words[sstr] + 1 end
  end
end
local a, b = 0, 0
for k, v in pairs(words) do
  if v % 2 == 1 then
    if b == 0 then
      b = v
    else
      b = -1
    end
  elseif v % 4 == 2 then
    a = a + 1
  end
end

if h % 2 == 0 and w % 2 == 0 then
  if a == 0 and b == 0 then
    print("Yes")
  else
    print("No")
  end
elseif h % 2 == 1 and w % 2 == 1 then
  if 0 < b then
    if (b - 1) % 4 == 2 then
      a = a + 1
    end
    local hh, hw = (h - 1) // 2, (w - 1) // 2
    if a <= hh + hw then
      print("Yes")
    else
      print("No")
    end
  else
    print("No")
  end
else
  if b ~= 0 then
    print("No")
  else
    if h % 2 == 1 then h, w = w, h end
    local hh = h // 2
    if a <= hh then
      print("Yes")
    else
      print("No")
    end
  end
end
