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

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

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