toInt :: (String -> Int)
toInt x = read x :: Int

getInts = do
  x <- getLine
  let y = (map$toInt)$words x
  return y
  
main = do
  inNum <- getInts
  let square = (inNum !! 0) * (inNum !! 1)
  let perimeter = (inNum !! 0) * 2 + (inNum !! 1) * 2
  putStrLn ((show square) ++ [' '] ++ (show perimeter))
