plus :: [Integer] -> Integer
plus [] = 0
plus (x:xs) = x + plus xs

mult :: [Integer] -> Integer
mult [] = 1
mult (x:xs) = x * mult xs

rect_area :: [Integer] -> Integer
rect_area xs = mult xs

rect_circumference :: [Integer] -> Integer
rect_circumference xs = plus xs * 2

strtoints :: [String] -> [Integer]
strtoints xs =  map read xs

intstostr :: [Integer] -> [String]
intstostr xs = map show xs


main = do
  str <- getLine
  putStrLn $ unwords $  intstostr (rect_circumference (strtoints (words str)) : rect_area (strtoints (words str)) : [])