import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n,m] <- getIntList
    let vs = take m $ zip [1..n] [n,n-1..1]
    forM_ vs $ \(a, b) -> do
        putStr $ show a
        putStr " "
        putStrLn $ show b