import Data.List (sort) main = do [a, b] <- fmap (map read . words) getLine mapM_ (putStrLn . show) $ sort $ [ i + 5 * j | i <- [0..a], j <- [0..b], i /= 0 || j /= 0 ]