local H, W, h, w = io.read("*n", "*n", "*n", "*n")
if H % h == 0 and W % w == 0 then
  print("No")
else
  print("Yes")
  if H % h ~= 0 then
    local dv = H // h
    local p1 = dv + 1
    local p2 = -p1 - 1
    for i = 1, H do
      for j = 1, W do
        if i % h == 1 then
          io.write(p1)
        elseif i % h == 0 then
          io.write(p2)
        else
          io.write(0)
        end
        io.write(j == W and "\n" or " ")
      end
    end
  else
    local dv = W // w
    local p1 = dv + 1
    local p2 = -p1 - 1
    for i = 1, H do
      for j = 1, W do
        if j % w == 1 then
          io.write(p1)
        elseif j % w == 0 then
          io.write(p2)
        else
          io.write(0)
        end
        io.write(j == W and "\n" or " ")
      end
    end
  end
end
