import Data.List main = do [a,b] <- map read . words <$> getLine mapM print $ nub $ sort[i+5*j | i<-[0..a], j<-[0..b], i+j/=0]