main :: IO ()
main = do
    str <- getLine
    let inputs = [read word :: Int | word <- words str]
    putStrLn $ unwords $ map (show . (\x -> x inputs)) [area, circum]

area :: [Int] -> Int
area (a:b:_) = a * b

circum :: [Int] -> Int
circum (a:b:_) = 2 * (a + b)