main = do
  li <- getLine
  let [n,m] = map read $ words li
  let ans = compute n m
  putStrLn $ unlines $ map (\(a,b) -> unwords [show a, show b]) ans

compute :: Int -> Int -> [(Int,Int)]
compute n m = take m $ genall n

gen a b
  | a+1 <= b = (a,b) : gen (succ a) (pred b)
  | otherwise = []

genall n = gen 1 (1+d) ++ gen (2+d) (1+d+d)
  where
    d = (n-1) `div` 2
