process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
    var lines = chunk.toString().split('\n');
var tate =lines[0];
var yoko = lines[1];
var men = tate * yoko;
var syu = tate * 2 + yoko * 2;
console.log(men+" "+syu);
});