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

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

main = do 
   x <-getLine
   let y = read x ::Int
   z  <-getLine 
   let w = read z ::Int
   putStrLn $ show (f y w) ++ " " ++ show (g y w)