function Main(arg) {
 
    arg = arg.split("\n")[0];
    var H = arg.split(" ")[0]-0;
    var W = arg.split(" ")[1]-0;
    var A = arg.split(" ")[2]-0;
    var B = arg.split(" ")[3]-0;

    var tmp = new Array(W).fill(0);
    var ans = [];
    var a = new Array(W).fill(0);
    var f = true;
    for (var i = 0; i < H; i++){
        var cnt = 0;
        for (var j = 0; j < W; j++){
            if (a[j] < B || B === 0) {
                tmp[j] = 1;
                cnt++;
                a[j]++;
            }

            if (cnt === A) break;
        }
        if (cnt !== A) {
            f = false;
            break
        }
        ans[i] = tmp.slice();
        tmp.fill(0);
    }

    for (var j = 0; j < W; j++) {
        if (a[j] !== B) {
            f = false;
            break;
        }
    }

    if (f) {
        for (var i = 0; i < H; i++) {
            console.log(ans[i].join(""));
        }
    }
    else {
        console.log("No");
    }
}

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