#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cassert>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <bitset>

using namespace std;

using ll =  long long;
using Pll = pair<ll, ll>;
using Pii = pair<int, int>;

constexpr ll MOD = 1000000007;
constexpr long double EPS = 1e-10;
constexpr int dyx[4][2] = {
    { 0, 1}, {-1, 0}, {0,-1}, {1, 0}
};

ll x,y,d;

ll extgcd(ll a, ll b, ll &x, ll &y){
    d = a;
    if(b == 0){
        x = 1;
        y = 0;
    }else{
        d = extgcd(b, a%b, y, x);
        y -= a/b * x;
    }
    return d;
}

int main() {
    std::ios::sync_with_stdio(false); cin.tie(nullptr);
    int h, w, a, b;
    cin >> h >> w >> a >> b;

    bool broken = false;
    vector<int> vi, vj;
    for(int i=0;i<=h;++i) {
        for(int j=0;j<=w;++j) {
            if(a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j)) {
                vi.push_back(i);
                vj.push_back(j);
            }
        }
    }

    if(vi.empty()) {
        cout << "No" << endl;
        return 0;
    }

    for(int k=0;k<vi.size();++k) {
        int i = vi[k], j = vj[k];
        vector<int> column(w, 0);
        vector<vector<int>> ans(h, vector<int>(w, 0));
        bool succeeded = true;
        for(int ii=0;ii<h;++ii) {
            int cnt = 0;
            priority_queue<Pii, vector<Pii>, greater<Pii>> que;
            for(int jj=0;jj<w;++jj) {
                que.emplace(column[jj], jj);
            }
            while(!que.empty()) {
                int jj = que.top().second; que.pop();
                if(ii < i) {
                    if(jj < j) {
                        if(cnt < a && column[jj] < b) {
                            ans[ii][jj] = 1;
                            ++cnt;
                            ++column[jj];
                        }
                    } else {
                        if(cnt < a && column[jj] < h-b) {
                            ans[ii][jj] = 1;
                            ++cnt;
                            ++column[jj];
                        }
                    }
                    
                } else {
                    if(jj < j) {
                        if(cnt < w-a && column[jj] < b) {
                            ans[ii][jj] = 1;
                            ++cnt;
                            ++column[jj];
                        }
                    } else {
                        if(cnt < w-a && column[jj] < h-b) {
                            ans[ii][jj] = 1;
                            ++cnt;
                            ++column[jj];
                        }
                    }
                }
            }

            if(ii < i && cnt < a) {
                succeeded = false;
            }
            if(ii >= i && cnt < w-a) {
                succeeded = false;
            }
        }
        
        if(!succeeded) continue;

        for(int ii=0;ii<h;++ii) {
            for(int jj=0;jj<w;++jj) {
                cout << ans[ii][jj];
            }
            cout << endl;
        }
        return 0;
    }
    return 0;
}


Measured memory_bytes: 5248