import Data.List.Split

data Rect = Rect {
  len :: Int,
  wid :: Int
} deriving (Show)

readRect :: String -> Rect
readRect line =
  let l:w:_ = splitOn " " line
      len = read l :: Int
      wid = read w :: Int
  in Rect len wid

getArea :: Rect -> Int
getArea Rect { len=l, wid=w } = l * w

getPerimeter :: Rect -> Int
getPerimeter Rect { len=l, wid=w } = l * 2 + w * 2

main = do
  line <- getLine
  let r = readRect line
      rarea = getArea r
      rperi = getPerimeter r
  putStrLn $ show rarea ++ " " ++ show rperi
  return ()