calcArea :: Int -> Int -> Int
calcArea a b = a * b

calcPerimeter :: Int -> Int -> Int
calcPerimeter a b = (a + b) * 2

main = do
  line <- getLine
  let 
    [a,b] = map read $ words line :: [Int]
    area = calcArea a b
    perimeter = calcPerimeter a b
  putStrLn $ show area ++ " " ++ show perimeter
