import Data.List

main :: IO ()
main  = getLine
    >>= return . map read . words
    >>= return . (\ xs -> [product xs , sum xs * 2])
    >>= mapM_ putStr . intersperse " " . map show
    >> putStrLn ""