h = gets.split.map(&:to_i)
ary = Array.new(h[0]).map{Array.new(h[1],0)}

if h[0]*h[2] != h[1]*h[3] && h[2] != 0 && h[3] != 0
  puts 'No'
else
  ary.each_with_index(1) do |row, i|
    h[2].times do |j|
      k = i + j
      ary[k] = 1
    end
  end
  ary.each do |l|
    puts l.join
  end
end
