main = do
	cs <- getLine
	let ns = toIntList cs
	putStrLn $ showAnswer ns

toIntList :: String -> [Integer]
toIntList = map read . words

area :: [Integer] -> Integer
area = foldl1 (*)

circumference :: [Integer] -> Integer
circumference = (* 2) . foldl1 (+)

showAnswer :: [Integer] -> String
showAnswer ns = unwords $ map (show . ($ ns)) [area, circumference]
