let split_ints str =
  Str.split (Str.regexp " ") str
  |> List.map int_of_string


let println_int i =
  print_int i;
  print_newline ()


let n, m =
  match read_line () |> split_ints with
  | [a; b] -> (a, b)
  | _ -> raise (Failure "more than 2 elements in a line.")

let _ = n * m |> print_int
let _ = print_char ' '
let _ = (n + m) * 2 |> println_int