fun main(args: Array<String>) {
    println(rectangle(readLine()!!))
}

fun rectangle(input: String) : String {
    val height = input.split(" ")[0].toInt()
    val width = input.split(" ")[1].toInt()

    val area = height * width
    val circumference = height * 2 + width * 2

    return "$area $circumference"
}
