program agc038_a
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: h,w,a,b,i,j,ii
    integer(int32), allocatable:: aa(:),bb(:)
    character(:),allocatable:: ans1,ans2

    read*, h,w,a,b

    allocate(aa(h+1), bb(w+1))
    allocate(character(w):: ans1,ans2)
    do i=1,a
        ans1(i:i) = '1'
        ans2(i:i) = '0' 
    end do
    do i=a+1,w
        ans1(i:i) = '0'
        ans2(i:i) = '1'
    end do

    do i=1,h+1
        aa(i) = a*h+(w-2*a)*(i-1)
    end do

    do i=1,w+1
        bb(i) = b*w+(h-2*b)*(i-1)
    end do
    ! print'(*(i0,1x))', aa(:)
    ! print'(*(i0,1x))', bb(:)
    do i=1,h+1
        do j=1,w+1
            if (aa(i)==bb(j)) then
                do ii=1,b
                    print'(a)', ans1
                end do
                do ii=b+1,h
                    print'(a)', ans2
                end do
                stop
            end if
        end do
    end do
    print'(a)', 'No'
end program agc038_a