object Main extends App {
  val scanner = new java.util.Scanner(System.in)
  val a = scanner.nextInt
  val b = scanner.nextInt

  val area = a * b
  val perimeter = 2 * a + 2 * b

  println(s"$area $perimeter")
}