import scala.io.StdIn

object Main extends App {

  val (n, m) = readIntPair
  val (l, r) = (1 to n).splitAt(n / 2)
  l.reverse.take(m).zip(r).foreach { case (x , y) =>
    println(s"$x $y")
  }


  def readIntPair: (Int, Int) = {
    val Array(x, y) = StdIn.readLine().split(" ").map(_.toInt)
    (x, y)
  }

  def readIntArr = StdIn.readLine().split(" ").map(_.toInt)
}
