import std.string;
import std.stdio;
import std.functional;
import std.conv;
import std.algorithm;

void main(){
    readln.split.map!(to!int).unaryFun!(a => text(a[0] * a[1], " ", 2 * (a[0] + a[1]))).writeln;
}