var maxCount;
var mats = [];
var matts = [];
function Main(input) {
    input = input.split(" ");
    var a = parseInt(input[0], 10);
    var b = parseInt(input[1], 10);
    var c = parseInt(input[2], 10);
    var d = parseInt(input[3], 10);

    maxCount = a * b;

    for (var i = 0; i < maxCount; i++) {
        mats.push([0, 1]);
    }

    saiki([], 0);


    var result = matts.find(e => {

        var result1 = true;
        for (var j = 0; j < b; j++) {
            var aaa = e.slice(j * a, (j + 1) * a).reduce((prev, curr) => {
                return prev + curr;
            }, 0)

            if(aaa>a/2){
                aaa=a-aaa;
            }            

            if (aaa != d) {
                result1 = false
            }
        }

        var result2 = true;
        if (result1) {
            for (var k = 0; k < a; k++) {
                var aaa = 0;
                for (var t = 0; t < b; t++) {
                    aaa += e[t * a + k]
                }
                if(aaa>b/2){
                    aaa=b-aaa;
                }
                if (aaa != c) {
                    return false;
                }
            }
        }
        return result1 && result2;        
})
    if(!result){
     console.log("No"); 
    }else{
        var aaa =result.reduce((prev,curr)=>{
            return prev+curr
        },"")
        for(var i=0;i<a-1;i++){
            var index = (i+1)*b+i
            aaa = aaa.slice(0,index)+"\n"+aaa.slice(index)
        }

        console.log(aaa);
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function saiki(array, index) {
    if (index == maxCount) {
        matts.push(array);
        return;
    } else {
        mats[index].forEach(e => {
            var newArray = array.slice()
            newArray.push(e);
            saiki(newArray, index + 1)
        })
    }
}





