rect_area :: Integer -> Integer -> Integer
rect_area a b = a * b

rect_circumference :: Integer -> Integer -> Integer
rect_circumference a b = (a + b) * 2

main = do
  i <- getLine
  j <- getLine
  print $ rect_area (read i) (read j)
  print $ rect_circumference (read i) (read j)