function Main(input) {
    input = input.split("\n");
    for (i=0; i < input.length-1; i++) {
        tmp = input[i].split(" ");
        var a = parseInt(tmp[0], 10);
        var b = parseInt(tmp[1], 10);
        console.log('%d', a*b, a*2 + b*2);
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
