H,W,A,B=$<.read.split.map(&:to_i)

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


if H%A != 0 || W%B != 0 || H/A != W/B
    puts 'No'
    exit
end

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

i = j = 0
while i < H && j < W
    A.times do |k|
        break if H <= i+k
        arr[i+k][j..[j+B-1,W-1].min] = line
    end
    i += A
    j += B
end

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