import Control.Monad

nPr :: Integral a => a -> a -> a
nPr 0 _ = 0
nPr _ 0 = 0
nPr n r = product [(n - r + 1)..n]

nCr :: Integral a => a -> a -> a
nCr 0 _ = 0
nCr _ 0 = 0
nCr n r = nPr n r `div` product [1..r]

main :: IO ()
main = do
    [h,w,a,b] <- map read . words <$> getLine :: IO [Integer]
    if (b == 0 || h `nCr` b >= w)
       && (a == 0 || w `nCr` a >= h)
       then
          forM_ [0..h-1] (\i -> do
            forM_ [0..w-1] (\j -> do
                let bgn = if a == 0 then 0 else (i `div` a) * a
                    end = bgn + a - 1
                if bgn <= j && j <= end then putChar '1' else putChar '0'
                if j == w-1 then putStrLn "" else return ()
                ))
       else putStrLn "No"
