(stdin => {
  // Define Function
  const area = a => b => a * b
  const perimeter = a => b => (a + b) * 2  

  // Declare Variable
  const inputs = stdin.toString().trim().split(' ')

  const x = Number(inputs[0])
  const y = Number(inputs[1])

  console.log([area(x)(y), perimeter(x)(y)].join(' '))

})(require('fs').readFileSync('/dev/stdin', 'utf8'))
