import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto l = readln.split.to!(int[]);
    auto H = l[0];
    auto W = l[1];
    auto A = l[2];
    auto B = l[3];

    if (W == 1 && A == 0) {
        char[] r;
        foreach (_; 0..B) r ~= '1';
        foreach (_; 0..H-B) r ~= '0';
        foreach (rr; r) writeln(rr);
        return;
    }

    if (H == 1 && B == 0) {
        char[] r;
        foreach (_; 0..A) r ~= '1';
        foreach (_; 0..W-A) r ~= '0';
        writeln(r);
        return;
    }

    if (W%A != 0 || H%B != 0 || W/A != H/B) {
        writeln("No");
        return;
    }

    char[][] R;
    R.length = H;
    foreach (h; 0..H) {
        foreach (w; 0..W) {
            if (w/A == h/B) {
                R[h] ~= '1';
            } else {
                R[h] ~= '0';
            }
        }
    }

    foreach (r; R) writeln(r);
}