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 xs = words x 
   let y = read(xs !! 0) ::Int
   let z = read(xs !! 1 )::Int
   putStrLn $ show (f y z) ++ " " ++ show (g y z)
   