fun main(args: Array<String>){
    val aspects : List<Int>? = readLine()?.split(" ")?.map { Integer.parseInt(it)}
    if ( aspects != null && aspects.isNotEmpty() ) {
        println("${calcArea(aspects[0], aspects[1])} ${calcPerimeter(aspects[0], aspects[1])}")
    }
}

fun calcArea(height: Int, width: Int) : Int = height * width

fun calcPerimeter(height: Int, width: Int) : Int = height * 2 + width * 2
