process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
    const n = chunk.toString().trim().split('\n');
    const area  = n.reduce((acc, cur) => acc * cur);
    const circle = n.reduce((acc, cur) => acc * 2 + cur * 2);
    console.log(area + ' ' + circle);
});
