# H,W,A,B=$<.read.split.map(&:to_i)
H,W,A,B=[5,6,2,2]

if A == 0 && B == 0
    puts 'No'
    exit
elsif A == 0
    if W != 1
        puts 'No'
    else
        puts ([1] * B + [0] * (H-B)).join("\n")
    end
    exit
elsif B == 0
    if H != 1
        puts 'No'
    else
        puts ([1] * A + [0] * (W-A)).join
    end
    exit
end

arr = Array.new(H) { Array.new(W,0) }
line = [1] * A

B.times do |i|
    arr[i][0..A-1] = line
end
line = [1] * (W-A)
(H-B).times do |i|
    arr[B+i][A..W-1] = line
end

puts arr.map {|l| l.join}