object main{
  def main(args: Array[String]) = println( (num.head * num.last) + " " + ((x: Int, y: Int) => 2 * (x + y))(num.head, num.last) )
    val num = (scala.io.StdIn.readLine).split(" ") map ( x => x.toInt )
}