main :: IO () main = do x <- readLn :: IO Integer putStrLn $ show (nCr 31 x) ++ " " ++ show ((nCr 30 (x - 1)) * (2 ^ 31 - 1)) nCr :: Integer -> Integer -> Integer nCr n r | r < 0 = 0 | r > n = 0 | otherwise = div (fact n) ((fact (n - r)) * (fact r)) where fact :: Integer -> Integer fact n = product [1..n]