let () = Scanf.scanf "%d %d %d %d" @@ fun height width h w ->
  let ass =
    Array.init height @@ fun i ->
      Array.init width @@ fun j ->
        if (i + 1) mod h = 0 && (j + 1) mod w = 0 then ~- (h * w)
        else 1 in
  if Array.fold_left (Array.fold_left ( + )) 0 ass <= 0 then
    print_endline "No"
  else begin
    print_endline "Yes";
    Array.iter (fun as_ ->
      Array.iter (Printf.printf "%d ") as_;
      print_newline ()) ass
  end
