(* let sl = Str.split (Str.regexp " ") @@ read_line () *)
(* let il = List.map int_of_string sl *)

(* let ar = Array.of_list il *)

let sl = Str.split (Str.regexp " ") @@ read_line ()
let il = List.map int_of_string sl

let ar = Array.of_list il

let area = ar.(0) * ar.(1)

let shu = (ar.(0) + ar.(1)) * 2

let () = print_int area;
  print_string " ";
  print_int shu;
  print_newline ()