import Control.Monad

area :: Num a => a -> a -> a
area a b = a * b

perimeter :: Num a => a -> a -> a
perimeter a b = (a * 2) + (b * 2)

main :: IO ()
main = do
  raw <- getLine
  let a = read . head . words $ raw
  let b = read . last . words $ raw
  putStr (show $ area a b)
  putStr " "
  putStrLn (show $ perimeter a b)