object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val x = sc.nextInt
    val y = sc.nextInt

    println(calcArea(x, y) + " " + calcPerimeter(x, y))
  }

  def calcArea(x: Int, y: Int): Int = x * y
  def calcPerimeter(x: Int, y: Int): Int = 2*x + 2*y
}