module Main where import Control.Applicative main :: IO () main = do x <- readLn if x <= 31 then do let c = product [(32-x)..31] `div` product [1..x] s = sum [2 ^ n | n <- [0..30]] * c * x `div` 31 putStrLn $ unwords [show c, show s] else putStrLn "0 0"