main = do e<-getLine let n=read e putStrLn $ unwords $ map show $ head [(a:b:[])|a<-[1..10],b<-[1..10],a+b==n]