function rectAndPeri() {
    var Array = x.split(" ");
    var a = parseInt(Array[0]);
    var b = parseInt(Array[1]);
    var rect = a * b
    var peri = (a + b) * 2
    console.log(rect + " " + peri) ;
}

x = require('fs').readFileSync('/dev/stdin', 'utf8')

rectAndPeri(x)

