const print2elm = (a,b) => f => console.log(f(a,b));

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);
calc((a,b) => (a+b)*2);
