h, w, a, b = gets.split.map(&:to_i)
h_option_1 = w - a
h_option_2 = w - h_option_1
w_option_1 = h - b
w_option_2 = h - w_option_1
h_min = [h_option_1, h_option_2].min
h_max = [h_option_1, h_option_2].max
h_gap = h_max - h_min
w_min = [w_option_1, w_option_2].min
w_max = [w_option_1, w_option_2].max
w_gap = w_max - w_min
ans = Array.new(h) { Array.new(w) }

h_options = [h_min * h]
h.times do
  h_options << h_options.last + h_gap
end

w_options = [w_min * w]
w.times do
  w_options << w_options.last + w_gap
end

same_options = h_options & w_options

if same_options.empty?
  puts "No"
  exit
else
  same_option = same_options.first
  h_max_count = h_options.bsearch_index { |i| i >= same_option }
  h_min_count = w - h_max_count
  w_max_count = w_options.bsearch_index { |i| i >= same_option }
  w_min_count = h - w_max_count
  h_rest_hash = Hash.new(0)
  tmp = 0
  h_max_count.times do
    h_rest_hash[tmp] = h_max
    tmp += 1
  end
  h_min_count.times do
    h_rest_hash[tmp] = h_min
    tmp += 1
  end

  w_rest_hash = Hash.new(0)
  tmp_2 = 0
  w_max_count.times do
    w_rest_hash[tmp_2] = w_max
    tmp_2 += 1
  end
  w_min_count.times do
    w_rest_hash[tmp_2] = w_min
    tmp_2 += 1
  end

  h_orders = (0..h - 1).to_a.shuffle
  w_orders = (0..w - 1).to_a.shuffle

  h_orders.each do |h_index|
    w_orders.each do |w_index|
      # h_index = (h_index + w_index) % h
      # w_index = (w_index + h_index) % w
      if h_rest_hash[h_index] > 0 && w_rest_hash[w_index] > 0
        ans[h_index][w_index] = 1
        h_rest_hash[h_index] -= 1
        w_rest_hash[w_index] -= 1
      else
        ans[h_index][w_index] = 0
      end
    end
    # else
    #   (w - 1).downto(0) do |w_index|
    #     if h_rest_hash[h_index] > 0 && w_rest_hash[w_index] > 0
    #       ans[h_index][w_index] = 1
    #       h_rest_hash[h_index] -= 1
    #       w_rest_hash[w_index] -= 1
    #     else
    #       ans[h_index][w_index] = 0
    #     end
    #   end
    # end
  end

  ans.each do |row|
    puts row.join
  end
end
