main = do n <- getLine let (a,b) = delete7 n putStrLn (show a ++ " " ++ show b) delete7 :: String -> (Int, Int) delete7 n = (read n', read n - read n') where n' = map (\d -> if d=='7' then '1' else '0') n