def main():

    H, W, A, B = map(int, input().split())
    isfound = False
    for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
    if not isfound:
        return "No"

    count = [B for _ in range(q)] + [H-B for _ in range(W-q)]

    for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

    for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))


if __name__ == '__main__':
    main() def main():

    H, W, A, B = map(int, input().split())
    isfound = False
    for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
    if not isfound:
        return "No"

    count = [B for _ in range(q)] + [H-B for _ in range(W-q)]

    for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

    for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp))) main H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B isfound = False isfound False for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
     m range(H+1) range H+1 H 1 for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
         n range(W+1) range W+1 W 1 if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
         m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B) m*A + (H-m)*(W-A) m*A m A (H-m)*(W-A) H-m H m W-A W A n*B + (W-n)*(H-B) n*B n B (W-n)*(H-B) W-n W n H-B H B isfound = True isfound True p, q = m, n p m q n break if isfound:
            break
     isfound break if not isfound:
        return "No"

     not isfound isfound return "No" "No" B for _ in range(q) for _ in range(q) _ range(q) range q for _ in range(q) B count = [B for _ in range(q)] + [H-B for _ in range(W-q)] count [B for _ in range(q)] + [H-B for _ in range(W-q)] [B for _ in range(q)] [H-B for _ in range(W-q)] for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

     i range(p) range p temp = [] temp [] cnt = A cnt A for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
         j range(W) range W if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
         count[j] > 0 and cnt > 0 count[j] > 0 count[j] count j 0 cnt > 0 cnt 0 cnt -= 1 cnt 1 count[j] -= 1 count[j] count j 1 temp.append(1) temp.append temp append 1 temp.append(0) temp.append temp append 0 print("".join(map(str, temp))) print "".join(map(str, temp)) "".join "" join map(str, temp) map str temp for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp))) i range(H-p) range H-p H p temp = [] temp [] cnt = W-A cnt W-A W A for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
         j range(W) range W if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
         count[j] > 0 and cnt > 0 count[j] > 0 count[j] count j 0 cnt > 0 cnt 0 cnt -= 1 cnt 1 count[j] -= 1 count[j] count j 1 temp.append(1) temp.append temp append 1 temp.append(0) temp.append temp append 0 print("".join(map(str, temp))) print "".join(map(str, temp)) "".join "" join map(str, temp) map str temp if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():

    H, W, A, B = map(int, input().split())
    isfound = False
    for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
    if not isfound:
        return "No"

    count = [B for _ in range(q)] + [H-B for _ in range(W-q)]

    for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

    for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp))) def main():

    H, W, A, B = map(int, input().split())
    isfound = False
    for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
    if not isfound:
        return "No"

    count = [B for _ in range(q)] + [H-B for _ in range(W-q)]

    for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

    for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp))) main
def main():

    H, W, A, B = map(int, input().split())
    isfound = False
    for m in range(H+1):
        for n in range(W+1):
            if m*A + (H-m)*(W-A) == n*B + (W-n)*(H-B):
                isfound = True
                p, q = m, n
                break
        if isfound:
            break
    if not isfound:
        return "No"

    count = [B for _ in range(q)] + [H-B for _ in range(W-q)]

    for i in range(p):
        temp = []
        cnt = A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))

    for i in range(H-p):
        temp = []
        cnt = W-A
        for j in range(W):
            if count[j] > 0 and cnt > 0:
                cnt -= 1
                count[j] -= 1
                temp.append(1)
            else:
                temp.append(0)
        print("".join(map(str, temp)))


if __name__ == '__main__':
    main()