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

culArea :: (Num a) => a -> a -> a
culArea a b = a * b

main = do
    line <- getLine
    let [a, b] = map read $ words line
    putStrLn $ show (culArea a b) ++ " " ++ show (culPerimeter a b) 

