{-# LANGUAGE BangPatterns #-}

module Main where

import Data.Char
import Control.Monad
import Control.Applicative


readInt :: IO Int
readInt = read <$> input
    where input = do
            c <- getChar
            if isDigit c
                then (c :) <$> input
                else return []

main = do
    [a, b] <- replicateM 2 readInt
    let s = a * b
        t = (a + b) * 2
    putStrLn $ show s ++ " " ++ show t

