H,W,A,B=gets.split.map(&:to_i)
pat=false
pat=1 if W==H && A==1 && B==1
pat=2 if A!=0 && B==0
pat=3 if A==0 && B!=0
pat=4 if A==0 && B==0

if !pat
    cnta=false
    cntb=false
    for p in 1..W/2
        if A==((W/2*p)*p) + ((W % 2*p <= p) ? W % 2*p : p)
            cnta=p
            break
        end
    end
    for p in 1..H/2
        if A==((H/2*p)*p) + ((H % 2*p <= p) ? H % 2*p : p)
            cntb=p
            break
        end
    end
    pat=5 if cnta && cntb
end

if !pat
    puts "No"
    exit
end

if pat==2
    H.times do
        puts "1"*A+"0"*(W-A)
    end
    exit
elsif pat==3
    B.times do
        puts "1"*W
    end
    (H-B).times do
        puts "0"*W
    end
    exit
elsif pat==4
    H.times do
        puts "1"*W
    end
    exit
end

if pat==1
    H.times do |i|
        s="0"*W
        s[i]="1"
        puts s
    end
    exit
end

if pat==5
    H.times do |i|
        if (i%cntb).even?
            s="0"*W
        else
            s="1"*W
        end
        W.times do |j|
            if (j % (2*cnta)) <= p
                s[j]=s[j]=="0" ? "1" : "0"
            end
        end
        puts s
    end
end
