area a b = a*b
leng a b = 2*(a+b)

main = do
    line <- getLine ::IO String
    let xs = map read $ words line
    let a = xs !! 0
    let b = xs !! 1
     
   
   
   
    putStr $ show $ area a b
    putStr " "
    putStrLn $ show $ leng a b
