"use strict"
class KP {
    constructor(callback) {
        this.data = [];
        this.reader = require('readline').createInterface({
            input: process.stdin,
            output: process.stdout
        });
        this.id = 0;
    }
    start() {
        return new Promise((resolve, reject) => {
            this.reader.on('line', (line) => {
                const dt = line.split(" ");
                for (let i = 0; i < dt.length; ++i) {
                    this.data.push(dt[i]);
                }
            });
            this.reader.on('close', () => {
                resolve(this);
            });
        });
    }
    input() {
        const id = this.id++;
        if (id >= this.data.length) {
            this.error("reached eof");
        }
        return this.data[id];
    }
    output(data) {
        if (arguments.length > 1) {
            data = [];
            for (let i = 0; i < arguments.length; ++i) {
                data[i] = arguments[i];
            }
        }
        else if (typeof data !== "object") {
            data = [data];
        }
        console.log(data.join(" "));
    }
    error(err) {
        console.error(err);
        console.abort();
    }
}

new KP().start().then((kp) => {
    const a = +kp.input();
    const b = +kp.input();
    kp.output([a*b, (a+b)*2]);
    process.exit(0);
});