const print2elm = (a,b) =>  fns => console.log(fns.map(f => f(a,b)).join(" "));
const input = require('fs').readFileSync('/dev/stdin', 'utf8');
const [a,b] = input.split(" ").map(Number);
const calc = print2elm(a,b);

calc([(a,b)=>a*b,(a,b)=>(a+b)*2]);

