process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', (chunk) => {
    const input = chunk.split(' ').map(el => Number(el));
    
    const rectangle = {
        area(arr) { 
            return arr.reduce((a, b) => a * b);
        },
        
        len(arr) {
            return arr.reduce((a, b) => a * 2 + b * 2);
        }
    };
    
    console.log(rectangle.area(input), rectangle.len(input));
});
