(function(stdin) {
    var lines = stdin.toString().split('\n');
    var param = lines[0].split(' ').map(Numbar);
    var a = param[0];
    var b = param[1];
    var menseki = a * b;
    var ensyu = a + b * 2;
    console.log(menseki);
    console.log(ensyu);

}(require('fs').readFileSync('/dev/stdin', 'utf8')));